/*************************************************************************** /*************************************************************************** * file: spec_pro.c , Special module. Part of DIKUMUD * | * MEDIEVIA CyberSpace Code and Data files * * Usage: Procedures handling special procedures for object/room/mobile * | * Copyright (C) 1992, 1996 INTENSE Software(tm) and Mike Krause * * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * | * All rights reserved * * * | ***************************************************************************/ * Copyright (C) 1992, 1993 Michael Chastain, Michael Quan, Mitchell Tse * | /*************************************************************************** * Performance optimization and bug fixes by MERC Industries. * | * This program belongs to INTENSE Software, and contains trade secrets of * * You can use our stuff in any way you like whatsoever so long as this * | * INTENSE Software. The program and its contents are not to be disclosed * * copyright notice remains intact. If you like it please drop a line * | * to or used by any person who has not received prior authorization from * * to mec@garnet.berkeley.edu. * | * INTENSE Software. Any such disclosure or use may subject the violator * * * | * to civil and criminal penalties by law. * * This is free software and you are benefitting. We hope that you * | ***************************************************************************/ * share your changes too. What goes around, comes around. * | ***************************************************************************/ < #include #include #include #include #include #include #include #include > #include > #include > #include > #include #include "structs.h" #include "structs.h" #include "mob.h" #include "mob.h" #include "obj.h" #include "obj.h" #include "utils.h" #include "utils.h" #include "interp.h" #include "interp.h" #include "handler.h" #include "handler.h" #include "db.h" #include "db.h" #include "spells.h" #include "spells.h" #include "limits.h" #include "limits.h" /* external vars */ /* external vars */ | extern char *GET_REAL_NAME(struct char_data *ch); extern struct room_data *world; | struct index_data *mob_index; > extern int number_of_players(); > extern unsigned long int connect_count; > extern int number_of_rooms; > extern int number_of_zones; > extern struct zone_data *zone_table; > extern char global_color; > extern struct room_data *world[MAX_ROOM]; /* array of rooms */ > extern char NODEATHTRAP; extern struct descriptor_data *descriptor_list; extern struct descriptor_data *descriptor_list; extern struct index_data *obj_index; extern struct index_data *obj_index; extern struct time_info_data time_info; extern struct time_info_data time_info; | extern put_obj_in_store(struct obj_data *obj, struct char_data *ch, FILE *fpsave); | extern bool in_a_shop(struct char_data *ch); > extern char *fread_paper(FILE *fl); > extern int top_of_world; > extern int top_of_zone_table; /* extern procedures */ /* extern procedures */ | bool put_in_formation(struct char_data *leader, struct char_data *follower); void hit(struct char_data *ch, struct char_data *victim, int type); void hit(struct char_data *ch, struct char_data *victim, int type); void gain_exp(struct char_data *ch, int gain); | void gain_exp(struct char_data *ch, int gain, struct char_data *victim); | extern bool is_formed(struct char_data *ch); void cast_burning_hands( byte level, struct char_data *ch, char *arg, int type, void cast_burning_hands( byte level, struct char_data *ch, char *arg, int type, struct char_data *victim, struct obj_data *tar_obj ); struct char_data *victim, struct obj_data *tar_obj ); void cast_chill_touch( byte level, struct char_data *ch, char *arg, int type, void cast_chill_touch( byte level, struct char_data *ch, char *arg, int type, struct char_data *victim, struct obj_data *tar_obj ); struct char_data *victim, struct obj_data *tar_obj ); void cast_colour_spray( byte level, struct char_data *ch, char *arg, int type, void cast_colour_spray( byte level, struct char_data *ch, char *arg, int type, struct char_data *victim, struct obj_data *tar_obj ); struct char_data *victim, struct obj_data *tar_obj ); void cast_energy_drain( byte level, struct char_data *ch, char *arg, int type, void cast_energy_drain( byte level, struct char_data *ch, char *arg, int type, struct char_data *victim, struct obj_data *tar_obj ); struct char_data *victim, struct obj_data *tar_obj ); void cast_fireball( byte level, struct char_data *ch, char *arg, int type, void cast_fireball( byte level, struct char_data *ch, char *arg, int type, struct char_data *victim, struct obj_data *tar_obj ); struct char_data *victim, struct obj_data *tar_obj ); void cast_magic_missile( byte level, struct char_data *ch, char *arg, int type, void cast_magic_missile( byte level, struct char_data *ch, char *arg, int type, struct char_data *victim, struct obj_data *tar_obj ); struct char_data *victim, struct obj_data *tar_obj ); void cast_blindness( byte level, struct char_data *ch, char *arg, int type, void cast_blindness( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_curse( byte level, struct char_data *ch, char *arg, int type, void cast_curse( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_sleep( byte level, struct char_data *ch, char *arg, int type, void cast_sleep( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_armor( byte level, struct char_data *ch, char *arg, int type, void cast_armor( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_bless( byte level, struct char_data *ch, char *arg, int type, void cast_bless( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_cure_light( byte level, struct char_data *ch, char *arg, int type, void cast_cure_light( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); /* Dragon breath .. */ /* Dragon breath .. */ void cast_fire_breath( byte level, struct char_data *ch, char *arg, int type, void cast_fire_breath( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_frost_breath( byte level, struct char_data *ch, char *arg, int type, void cast_frost_breath( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_acid_breath( byte level, struct char_data *ch, char *arg, int type, void cast_acid_breath( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_gas_breath( byte level, struct char_data *ch, char *arg, int type, void cast_gas_breath( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); void cast_lightning_breath( byte level, struct char_data *ch, char *arg, void cast_lightning_breath( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct obj_data *tar_obj ); /* Data declarations */ /* Data declarations */ struct social_type struct social_type { { char *cmd; char *cmd; int next_line; int next_line; }; }; /* ******************************************************************** /* ******************************************************************** * Special procedures for rooms * * Special procedures for rooms * ******************************************************************** */ ******************************************************************** */ > void do_push(struct char_data *ch, char *argument, int cmd) > { > int new_class, iWear; > if(IS_NPC(ch))return; > if(cmd==1000){ > if(!argument||!argument[0]){ > ch->p->querycommand=0; > return; > } > if(ch->specials.eggs<1000){ > send_to_char(" > You must help fight the WAR! Vryce will make you reborn into a new > player only if you have collected 1000 eggs from the catacombs.\n\r",ch); > ch->p->querycommand=0; > return; > > } > switch(argument[0]){ > case 'M': > case 'm': > if(GET_CLASS(ch)==CLASS_MAGIC_USER|| > IS_SET(ch->player.multi_class,MULTI_CLASS_MAGIC_USER)){ > send_to_char("You have done that already!\n\r",ch); > return; > } > new_class=CLASS_MAGIC_USER; > break; > case 'C': > case 'c': > if(GET_CLASS(ch)==CLASS_CLERIC|| > IS_SET(ch->player.multi_class,MULTI_CLASS_CLERIC)){ > send_to_char("You have done that already!\n\r",ch); > return; > } > new_class=CLASS_CLERIC; > break; > case 'W': > case 'w': > if(GET_CLASS(ch)==CLASS_WARRIOR|| > IS_SET(ch->player.multi_class,MULTI_CLASS_WARRIOR)){ > send_to_char("You have done that already!\n\r",ch); > return; > } > new_class=CLASS_WARRIOR; > break; > case 'T': > case 't': > if(GET_CLASS(ch)==CLASS_THIEF|| > IS_SET(ch->player.multi_class,MULTI_CLASS_THIEF)){ > send_to_char("You have done that already!\n\r",ch); > return; > } > new_class=CLASS_THIEF; > break; > default: > send_to_char("Huh? Try again.\n\r",ch); > return; > break; > } > ch->specials.eggs-=1000; > switch(GET_CLASS(ch)){ > case CLASS_MAGIC_USER: > SET_BIT(ch->player.multi_class,MULTI_CLASS_MAGIC_USER); > break; > case CLASS_CLERIC: > SET_BIT(ch->player.multi_class,MULTI_CLASS_CLERIC); > break; > case CLASS_WARRIOR: > SET_BIT(ch->player.multi_class,MULTI_CLASS_WARRIOR); > break; > case CLASS_THIEF: > SET_BIT(ch->player.multi_class,MULTI_CLASS_THIEF); > break; > } > for(iWear = 0; iWear < MAX_WEAR ; iWear++) > if(ch->equipment[iWear]) > obj_to_char(unequip_char(ch,iWear), ch); > > GET_CLASS(ch)=new_class; > GET_LEVEL(ch)=1; > GET_EXP(ch)=1; > set_title(ch); > ch->points.max_hit=25; > ch->points.max_mana=150; > ch->points.max_move=150; > GET_HIT(ch)=25; > GET_MANA(ch)=150; > GET_MOVE(ch)=150; > ch->specials.practices+=25; > send_to_room(" > The room is filled with a blinding light for 3 full breaths...you feel > yourself flung as if in a hurricane...your sense of balance fails you.. > you're falling...THWOOP! You blink to clear your eyes. > ",ch->in_room); > if(GET_CLASS(ch)==CLASS_THIEF){ > ch->skills[ SKILL_SNEAK ].learned = 10; > ch->skills[ SKILL_HIDE ].learned = 5; > ch->skills[ SKILL_STEAL ].learned = 15; > ch->skills[ SKILL_BACKSTAB ].learned = 10; > ch->skills[ SKILL_PICK_LOCK ].learned = 10; > } > ch->p->querycommand=0; > return; > } > if(ch->in_room!=6151){ > send_to_char("You cannot do that here.\n\r",ch); > return; > } > if(GET_LEVEL(ch)!=31){ > send_to_char("You are ZAPPED by the button!\n\r",ch); > return; > } > if(get_total_level(ch)>=124)return; > send_to_room("A powerful voice roars across the mountain... > You ... are ... *NOT* ... ... for godhood! You are not wise enough, > not OLD enough! Not complete! Go back.. Go back...... Go back as a newborn! > Learn what there is to be learned from the mortal realm...learn all things > great and small...learn all skills..learn all classes..be everything.. > Come back to me, Mortal when you are Ready! > ",6151); > strcpy(ch->p->queryprompt,"Pick a class you have not mastered yet. > ([M]age [C]leric [W]arrior [T]hief) or ENTER to abort> "); > ch->p->querycommand=1000; > ch->p->queryfunc=do_push; > return; > } > > > > > > int horneg_mage_room(struct char_data *ch, int cmd, char *arg) > { > struct char_data *mob=NULL; > char gotit=0; > > > mob = get_char_room("horneg", ch->in_room); > if (ch==mob) > return(FALSE); > if (mob) > { > if(GET_LEVEL(ch)>31)return(FALSE); > if(mob->specials.fighting)return(FALSE); > if(ch->equipment[WEAR_NECK_1]) > if(ch->equipment[WEAR_NECK_1]->item_number==10009) > gotit=1; > if(ch->equipment[WEAR_NECK_2]) > if(ch->equipment[WEAR_NECK_2]->item_number==10009) > gotit=1; > if(!gotit) > { > act("$n says, 'You are NOT Protected!' $n makes $N disappear!.", TRUE,mob, 0, ch, TO_ROOM); > char_from_room(ch); > char_to_room(ch, 10003); > do_look(ch, "", 15); > return(TRUE); > } > } > return(FALSE); > } > > int horneg_sarcophogus_room(struct char_data *ch, int cmd, char *arg) > { > struct char_data *mob=NULL; > int r_num; > struct obj_data *sarcophagus=NULL, *corpse=NULL; > > if(cmd==222 > && ( isname("sarcophagus",arg) > || isname("large",arg) > || isname("stone",arg) > ) > ){ > sarcophagus=get_obj_in_list("sarcophagus",world[ch->in_room]->contents); > if(!sarcophagus) > return(FALSE); > else > corpse = get_obj_in_list("corpse",sarcophagus->contains); > if(!corpse) > return(FALSE); > mob = get_char_room_vis(ch, "ghost"); > if (!mob) { > act("A large veil of mist swirls up from the sarcophogus and shifts into the form of a beautiful young lady!",TRUE,ch > send_to_char("A large veil of mist swirls up from the sarcophogus and shifts into the form of a beautiful young lady! > r_num = real_mobile(10014); > mob = read_mobile(r_num, REAL); > char_to_room(mob, ch->in_room); > do_emote(mob,"looks at you with fire in her eyes!",0); > do_say(mob,"You have defiled my sanctuary, now You Must Die!",0); > do_close(mob,"wall",0); > hit(mob,ch,0); > return(FALSE); > } > } > return(FALSE); > } > > int convention(struct char_data *ch, int cmd, char *arg) > { > int room; > if(cmd!=28)return(FALSE); > > send_to_char("You feel dizzy and disoriented!\n\r",ch); > send_to_char("Your whole being begins fading in and out.\n\r",ch); > send_to_char("Past dreams confront you from all angles.\n\r",ch); > send_to_char("You pass out.\n\r",ch); > send_to_char("You wake up feeling groggy, remembering what must have been a dream...\n\r",ch); > act("$n steps into the portal and vanishes.\n\r",TRUE,ch,0,0,TO_ROOM); > if(world[ch->in_room]->number==25)room=204; > else room=25; > char_from_room(ch); > char_to_room(ch,room); > do_look(ch,"",9); > return(TRUE); > } > char *how_good(int percent) char *how_good(int percent) { { if (percent == 0) if (percent == 0) return ( " (not learned)"); return ( " (not learned)"); if (percent <= 10) if (percent <= 10) return ( " (awful)"); return ( " (awful)"); if (percent <= 20) if (percent <= 20) return ( " (bad)"); return ( " (bad)"); if (percent <= 40) if (percent <= 40) return ( " (poor)"); return ( " (poor)"); if (percent <= 55) if (percent <= 55) return ( " (average)"); return ( " (average)"); if (percent <= 70) if (percent <= 70) return ( " (fair)"); return ( " (fair)"); if (percent <= 80) if (percent <= 80) return ( " (good)"); return ( " (good)"); if (percent <= 85) if (percent <= 85) return ( " (very good)"); return ( " (very good)"); return ( " (Superb)"); return ( " (Superb)"); } } int guild(struct char_data *ch, int cmd, char *arg) | /* Gives a random Mobile the Crystal, for Tear Fountain Questing */ > void load_dragon_crystal(void) > { > int random, r_num,tries; > struct char_data *mob=NULL; > struct obj_data *obj=NULL; > tries=0; > r_num=real_object(1399); > if(r_num<0){ > log_hd("###Some idiot removed object 1399 for tear fountain##"); > return; > } > while(tries<1500){ > tries++; > random=number(100,top_of_world-1); > if(world[random]&&world[random]->zone<196) > for(mob=world[random]->people;mob;mob=mob->next_in_room) > if(mob > && IS_NPC(mob) > && !in_a_shop(mob) > && !(mob->specials.death_timer) /* not a corpse or necro */ > && (!world[mob->in_room]->level_restriction) > ){ > obj=read_object(r_num,0); > obj_to_char(obj,mob); > return; > } > } > log_hd("## gave up loading a dragon crystal after 1500 tries"); > } > > > int mythago_wood(struct char_data *ch, int cmd, char *arg) > { > int room; > > if ( (GET_LEVEL(ch) >=32) && IS_AFFECTED(ch,AFF_INVISIBLE) ) > return(FALSE); > > send_to_char("A tree falls down and thumps you on the head!\n\r",ch); > send_to_char("Your whole being begins fade in and out.\n\r",ch); > send_to_char("Past dreams confronts you from all angles.\n\r",ch); > send_to_char("You pass out.\n\r",ch); > send_to_char("As you wake up, feeling groggy, you remember what must have been a dream..\n\rAbout being in the spooky woo > act("You notice $n was here a second ago and is now, Mmmm, just gone?\n\r",TRUE,ch,0,0,TO_ROOM); > char_from_room(ch); > do{ > room=number(5,100); > } while(room == 79 || room == 82); > /* }while(room>=2900&&room<=2999); */ > > /* skip these rooms because they were deleted them from the city and > re-used in trellor. People were transporting from medievia to trellor. > */ > if(room==79) > return(FALSE); > if(room==82) > return(FALSE); > > char_to_room(ch,room); > return(TRUE); > } > > int swamp_bog(struct char_data *ch, int cmd, char *arg) > { > int n; > > n=1050-(GET_WEIGHT(ch)+IS_CARRYING_W(ch))*2; > if(cmd<1||cmd>6)return(FALSE); > if(IS_AFFECTED(ch,AFF_FLYING)){ > send_to_char("You FLY just above the bog so you don't get stuck!\n\r",ch); > return(FALSE); > } > if(number(0,n)<100){ > send_to_char("You try to free your feet from the bog mud but fail.\n\r",ch); > send_to_char("Perhaps you are TOO HEAVY! (hint)\n\r",ch); > act("$n tries to move but is stuck in the bog mud.",TRUE,ch,0,0,TO_ROOM); > return(TRUE); > } > return(FALSE); > > } > int river_tree(struct char_data *ch, int cmd, char *arg) > { > int gotohere=2838; > > if ( (GET_LEVEL(ch) >=32) && IS_AFFECTED(ch, AFF_INVISIBLE)) > return(FALSE); > > while(gotohere==2838){ > gotohere=number(2800,2885); > } > send_to_char("The Old Man Willow tree GRABS YOU, in a steel-like grip!\n\r",ch); > send_to_char("As you struggle to break free, it pulls you down its gaping throat.\n\r",ch); > send_to_char("You are mysteriously transported into the middle of a spooky wood!\n\r\n\r",ch); > > act("The Old Man Willow tree GRABS $n, in a steel like grip!",TRUE,ch,0,0,TO_ROOM); > act("As $n struggles to break free, it pulls $n down its gaping throat.",TRUE,ch,0,0,TO_ROOM); > act("$n is gone.",TRUE,ch,0,0,TO_ROOM); > char_from_room(ch); > char_to_room(ch, gotohere); > do_look(ch,"",15); > return(TRUE); > } > > int tear_fountain(struct char_data *ch, int cmd, char *arg) > { > struct obj_data *obj=NULL; > int a; > > if(cmd!=70)return(FALSE); > > for(obj=ch->carrying;obj;obj=obj->next_content) > if(obj->item_number==1399)break; > if(!obj){ > send_to_char("\n\rthe Dragon growls, 'YOU DO NOT HAVE IT!'\n\r",ch); > send_to_char("'YOU THINK I AM A FOOL MORTAL!'\n\r",ch); > send_to_char("'BE GONE! BEFORE I LOOSE MY TEMPER!'\n\r",ch); > send_to_char("\n\r\n\rZZZZZAAAAaaaaaPPPP!!\n\rYou are brought to your knees from the PAIN!\n\r",ch); > GET_HIT(ch)=10; > return(TRUE); > } > extract_obj(obj); > act("The Ground TREMBLES beneath your feet!",TRUE,ch,0,0,TO_ROOM); > act("The Dragon shouts, 'You have FOUND IT!'",TRUE,ch,0,0,TO_ROOM); > act("The Ground TREMBLES beneath your feet!",TRUE,ch,0,0,TO_CHAR); > act("The Dragon shouts, 'You have FOUND IT!'",TRUE,ch,0,0,TO_CHAR); > if(ch->specials.practices > 175) > { > sprintf(log_buf,"As a Reward I give you this orb!"); > act(log_buf,TRUE,ch,0,0,TO_ROOM); > act(log_buf,TRUE,ch,0,0,TO_CHAR); > obj_to_char(read_object(1411,REAL),ch); > sprintf(log_buf,"## %s Offered a Dragon Crystal for an orb.", > GET_NAME(ch)); > log_hd(log_buf); > } > else > { > a=number(20,75); > sprintf(log_buf,"As a Reward I give you %d Practice Points!",a); > act(log_buf,TRUE,ch,0,0,TO_ROOM); > act(log_buf,TRUE,ch,0,0,TO_CHAR); > do_gossip(ch, > "I FOUND THE DRAGON CRYSTAL AND HAVE RECEIVED MY REWARD!",0); > ch->specials.practices+=a; > sprintf(log_buf,"## %s Offered a Dragon Crystal for %d pracs.", > GET_NAME(ch),a); > log_hd(log_buf); > } > load_dragon_crystal(); > return(TRUE); > } > > int death_trap(struct char_data *ch, int cmd, char *arg) > { > /*int to_room;*/ > if(IS_HOVERING(ch) || IS_DEAD(ch) || NODEATHTRAP) > return(FALSE); > > if(GET_LEVEL(ch)>31) > return(FALSE); > send_to_char("[DEATH TRAP!] YOU ARE DEAD!\n\r",ch); > /* > if(GET_CONTINENT(ch) == TRELLOR) > to_room=230; > else > to_room=3628; > char_from_room(ch); > char_to_room(ch,to_room); > */ > raw_kill(ch,NULL); > return(1); > } > > > int Spirited_Heights_DT(struct char_data *ch, int cmd, char *arg) > /* > Hanna tells you, 'My request is corpses in room 5164 (deathtrap) be > moved to room 2982 with no notice of the transfer.'. > */ { { > int in_room; > > if(IS_HOVERING(ch) || IS_DEAD(ch) ) > return(FALSE); > > in_room = ch->in_room; > if ( (GET_LEVEL(ch) >=31) ) > return(FALSE); > send_to_char("Your limp body hangs impaled on the stalagmite, bleeding and weezing.\n\r",ch); > send_to_char("After a few hours, the weezing finally stops.\n\r",ch); > send_to_char("YOU ARE DEAD!\n\r",ch); > /* > char_from_room(ch); > char_to_room(ch,2982); > */ > raw_kill(ch,NULL); > return(1); > } > > > int river_current(struct char_data *ch, int cmd, char *arg) > { > int room; > int toroom=0; > int iWear; > > if(IS_NPC(ch))return(0); > if (GET_LEVEL(ch) > 31) return(0); > if(ch->specials.fighting)return(0); > if(IS_AFFECTED(ch,AFF_FLYING))return(0); > for(iWear=0;iWear < MAX_WEAR; iWear++) > if(ch->equipment[iWear]) > if(ch->equipment[iWear]->obj_flags.type_flag==ITEM_FLY)return(0); > if(number(0,10)<10)return(0); > room=world[ch->in_room]->number; > > if(room==734) toroom=6216; > else if(room==6216) toroom=6220; > else if(room==6220) toroom=6215; > else if(room==6215) toroom=6219; > else if(room==6219) toroom=6218; > else if(room==6218) toroom=6217; > else if(room==6217) toroom=6221; > else if(room==6221) toroom=6222; > else if(room==6222) toroom=6223; > else if(room==6223) toroom=6225; > else if(room==6225) toroom=6224; > else if(room==6224) toroom=735; > else if((room>=706)&&(room<=725)) > toroom=room+1; > else if(room==726) toroom=729; > else if((room>=729)&&(room<=742)) > toroom=room+1; > else if(room==743) toroom=749; > else if((room>=749)&&(room<758)) toroom=room+1; > else if(room==758)toroom=764; > else if((room>=764)&&(room<=773))toroom=room+1; > > char_from_room(ch); > char_to_room(ch,toroom); > > send_to_char("\n\r**THE RIVER CURRENT PULLED YOU DOWNSTREAM!**\n\r",ch); > act("The current pulls $n next to you.", FALSE, ch,0,0,TO_ROOM); > do_look(ch, "", 15); > return(1); > } char buf[MAX_STRING_LENGTH]; | int guild(struct char_data *ch, int cmd, char *arg) int nnumber, number, i, percent; | { > char prac_buf[16000]; > int mednumber,nnumber, number, i, percent; extern char *spells[]; extern char *spells[]; extern struct spell_info_type spell_info[MAX_SPL_LIST]; extern struct spell_info_type spell_info[MAX_SPL_LIST]; extern struct int_app_type int_app[26]; extern struct int_app_type int_app[26]; > static char *medt_skills[] = { > "throw", > "scan", > "meditate", > "trap", > "track", > "\n" > }; > static char *medw_skills[] = { > "charge", > "meditate", > "\n" > }; > static char *nw_skills[] = { static char *nw_skills[] = { "secondattack", "secondattack", "disarm", "disarm", "thirdattack", "thirdattack", "parry", "parry", "\n" "\n" }; }; static char *nt_skills[] = { static char *nt_skills[] = { "trip", "trip", "dodge", "dodge", "dual", "dual", "disarm", "disarm", "\n" "\n" }; }; static char *w_skills[] = { static char *w_skills[] = { "kick", /* No. 50 */ "kick", /* No. 50 */ "bash", "bash", "rescue", "rescue", "\n" "\n" }; }; static char *t_skills[] = { static char *t_skills[] = { "sneak", /* No. 45 */ "sneak", /* No. 45 */ "hide", "hide", "steal", "steal", "backstab", "backstab", "pick", "pick", "\n" "\n" }; }; #if 0 #if 0 static char *ex_skills[] = { static char *ex_skills[] = { "recall", "recall", "/n" "/n" }; }; #endif #endif > if(GET_LEVEL(ch)>=35)ch->specials.practices=100; > if ((cmd != 164) && (cmd != 170)) return(FALSE); if ((cmd != 164) && (cmd != 170)) return(FALSE); for(; *arg==' '; arg++); for(; *arg==' '; arg++); switch (GET_CLASS(ch)) { switch (GET_CLASS(ch)) { case CLASS_MAGIC_USER :{ case CLASS_MAGIC_USER :{ if (!*arg) { if (!*arg) { sprintf(buf,"You have got %d practice sessions left.\n\r", | sprintf(prac_buf, "You have got %d practice sessions left.\n\r", ch->specials.practices); ch->specials.practices); | sprintf(prac_buf, "%sGuild practicing now costs from 1 to 3 (die roll) practice points.\n\r", prac_buf); send_to_char(buf, ch); | sprintf(prac_buf, "%sYou can practice any of these spells:\n\r",prac_buf); send_to_char("You can practice any of these spells:\n\r", ch); | for(i=0; *spells[i] != '\n'; i++) for(i=0; *spells[i] != '\n'; i++) if (spell_info[i+1].spell_pointer && | if (spell_info[i+1].spell_pointer && (spell_info[i+1].min_level_magic <= GET_LEVEL(ch))) { | (spell_info[i+1].min_level_magic <= GET_LEVEL(ch))) { sprintf(buf," %20s",spells[i]); | sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s][%s%4d%s]\n\r", send_to_char(buf, ch); | prac_buf, sprintf(buf,"%14s",how_good(ch->skills[i+1].learned)); | BLU(ch), NRM(ch), send_to_char(buf, ch); | spells[i], sprintf(buf," %4d",use_mana(ch,i+1)); | BLU(ch), NRM(ch), send_to_char(buf, ch); | how_good(ch->skills[i+1].learned), send_to_char("\n\r", ch); | BLU(ch), NRM(ch), } | use_mana(ch, i+1), > BLU(ch)); > } > page_string(ch->desc, prac_buf, 1); return(TRUE); return(TRUE); } } number = old_search_block(arg,0,strlen(arg),spells,FALSE); number = old_search_block(arg,0,strlen(arg),spells,FALSE); if(number == -1) { if(number == -1) { send_to_char("You do not know of this spell...\n\r", ch); send_to_char("You do not know of this spell...\n\r", ch); return(TRUE); return(TRUE); } } if (GET_LEVEL(ch) < spell_info[number].min_level_magic) { if (GET_LEVEL(ch) < spell_info[number].min_level_magic) { send_to_char("You do not know of this spell...\n\r", ch); send_to_char("You do not know of this spell...\n\r", ch); return(TRUE); return(TRUE); } } if (ch->specials.practices <= 0) { if (ch->specials.practices <= 0) { send_to_char("You do not seem to be able to practice now.\n\r", ch); send_to_char("You do not seem to be able to practice now.\n\r", ch); return(TRUE); return(TRUE); } } if (ch->skills[number].learned >= 95) { if (ch->skills[number].learned >= 95) { send_to_char("You are already learned in this area.\n\r", ch); send_to_char("You are already learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } send_to_char("You Practice for a while...\n\r", ch); send_to_char("You Practice for a while...\n\r", ch); ch->specials.practices--; | if(ch->specials.practices>3) | ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; > percent = ch->skills[number].learned+MAX(25,int_app[GET_INT(ch)].learn); percent = ch->skills[number].learned+MAX(25,int_app[GET_INT(ch)].learn); ch->skills[number].learned = MIN(95, percent); ch->skills[number].learned = MIN(95, percent); if (ch->skills[number].learned >= 95) { if (ch->skills[number].learned >= 95) { send_to_char("You are now learned in this area.\n\r", ch); send_to_char("You are now learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } } break; } break; case CLASS_THIEF: { case CLASS_THIEF: { if (!*arg) { if (!*arg) { sprintf(buf,"You have got %d practice sessions left.\n\r", | sprintf(prac_buf,"You have got %d practice sessions left.\n\r", ch->specials.practices); | ch->specials.practices); send_to_char(buf, ch); | sprintf(prac_buf, "%sYou can practice any of these skills:\n\r", send_to_char("You can practise any of these skills:\n\r", ch); | prac_buf); for(i=0; *t_skills[i] != '\n';i++) { for(i=0; *t_skills[i] != '\n';i++) { send_to_char(t_skills[i], ch); | sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s]\n\r", send_to_char(how_good(ch->skills[i+45].learned), ch); | prac_buf, send_to_char("\n\r", ch); | BLU(ch), NRM(ch), > t_skills[i], > BLU(ch), NRM(ch), > how_good(ch->skills[i+45].learned), > BLU(ch)); } } for(i=0; *nt_skills[i] != '\n';i++) { for(i=0; *nt_skills[i] != '\n';i++) { send_to_char(nt_skills[i], ch); | sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s]\n\r", send_to_char(how_good(ch->skills[i+SKILL_TRIP].learned), ch); | prac_buf, send_to_char("\n\r", ch); | BLU(ch), NRM(ch), > nt_skills[i], > BLU(ch), NRM(ch), > how_good(ch->skills[i+SKILL_TRIP].learned), > BLU(ch)); } } > for(i=0; *medt_skills[i] != '\n';i++) { > sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s]\n\r", > prac_buf, > BLU(ch), NRM(ch), > medt_skills[i], > BLU(ch), NRM(ch), > how_good(ch->skills[i+SKILL_THROW].learned), > BLU(ch)); > } > page_string(ch->desc, prac_buf, 1); return(TRUE); return(TRUE); } } number = search_block(arg,t_skills,FALSE); number = search_block(arg,t_skills,FALSE); nnumber = search_block(arg,nt_skills, FALSE); nnumber = search_block(arg,nt_skills, FALSE); | mednumber = search_block(arg,medt_skills, FALSE); if((number == -1) && (nnumber == -1)) { | if((number == -1) && (nnumber == -1) && (mednumber == -1)) { send_to_char("You do not know of this skill...\n\r", ch); send_to_char("You do not know of this skill...\n\r", ch); return(TRUE); return(TRUE); } } if (ch->specials.practices <= 0) { if (ch->specials.practices <= 0) { send_to_char("You do not seem to be able to practice now.\n\r", ch); send_to_char("You do not seem to be able to practice now.\n\r", ch); return(TRUE); return(TRUE); } } if (nnumber == -1) | if (nnumber == -1 && mednumber == -1) { | { if (ch->skills[number+SKILL_SNEAK].learned >= 90) { | if (ch->skills[number+SKILL_SNEAK].learned >= 90) { send_to_char("You are already learned in this area.\n\r", ch); | send_to_char("You are already learned in this area.\n\r", ch); return(TRUE); | return(TRUE); } | } send_to_char("You Practice for a while...\n\r", ch); | send_to_char("You Practice for a while...\n\r", ch); ch->specials.practices--; | if(ch->specials.practices>3) | ch->specials.practices-=dice(1,3); percent = ch->skills[number+SKILL_SNEAK].learned + | else MIN(int_app[GET_INT(ch)].learn, 12); | if(ch->specials.practices)ch->specials.practices--; ch->skills[number+SKILL_SNEAK].learned = MIN(90, percent); | percent = ch->skills[number+SKILL_SNEAK].learned + | MIN(int_app[GET_INT(ch)].learn, 12); if (ch->skills[number+SKILL_SNEAK].learned >= 90) { | ch->skills[number+SKILL_SNEAK].learned = MIN(90, percent); send_to_char("You are now learned in this area.\n\r", ch); | if (ch->skills[number+SKILL_SNEAK].learned >= 90) { return(TRUE); | send_to_char("You are now learned in this area.\n\r", ch); } | return(TRUE); } else | } > } else if(number == -1 && mednumber == -1) { { if (ch->skills[nnumber+SKILL_TRIP].learned >= 90) { if (ch->skills[nnumber+SKILL_TRIP].learned >= 90) { send_to_char("You are already learned in this area.\n\r", ch); send_to_char("You are already learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } send_to_char("You Practice for a while...\n\r", ch); send_to_char("You Practice for a while...\n\r", ch); ch->specials.practices--; | if(ch->specials.practices>3) | ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; percent = ch->skills[nnumber+SKILL_TRIP].learned + percent = ch->skills[nnumber+SKILL_TRIP].learned + MIN(int_app[GET_INT(ch)].learn, 12); | MIN(int_app[GET_INT(ch)].learn, 12); ch->skills[nnumber+SKILL_TRIP].learned = MIN(90, percent); ch->skills[nnumber+SKILL_TRIP].learned = MIN(90, percent); < if (ch->skills[nnumber+SKILL_TRIP].learned >= 90) { if (ch->skills[nnumber+SKILL_TRIP].learned >= 90) { send_to_char("You are now learned in this area.\n\r", ch); send_to_char("You are now learned in this area.\n\r", ch); return(TRUE); return(TRUE); > } > } else if(number == -1 && nnumber == -1) > { > if (ch->skills[mednumber+SKILL_THROW].learned >= 90) { > send_to_char("You are already learned in this area.\n\r", ch); > return(TRUE); > } > send_to_char("You Practice for a while...\n\r", ch); > if(ch->specials.practices>3) > ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; > percent = ch->skills[mednumber+SKILL_THROW].learned + > MIN(int_app[GET_INT(ch)].learn, 12); > ch->skills[mednumber+SKILL_THROW].learned = MIN(90, percent); > if (ch->skills[mednumber+SKILL_THROW].learned >= 90) { > send_to_char("You are now learned in this area.\n\r", ch); > return(TRUE); > } } } } < } break; } break; case CLASS_CLERIC :{ case CLASS_CLERIC :{ if (!*arg) { if (!*arg) { sprintf(buf,"You have got %d practice sessions left.\n\r", | sprintf(prac_buf, "You have got %d practice sessions left.\n\r", ch->specials.practices); ch->specials.practices); | sprintf(prac_buf, "%sGuild practicing now costs from 1 to 3 (die roll) practice points.\n\r", prac_buf); send_to_char(buf, ch); | sprintf(prac_buf, "%sYou can practice any of these spells:\n\r",prac_buf); send_to_char("You can practise any of these spells:\n\r", ch); < for(i=0; *spells[i] != '\n'; i++) for(i=0; *spells[i] != '\n'; i++) if (spell_info[i+1].spell_pointer && | if (spell_info[i+1].spell_pointer && (spell_info[i+1].min_level_cleric <= GET_LEVEL(ch))) { | (spell_info[i+1].min_level_cleric <= GET_LEVEL(ch))) { sprintf(buf," %20s ",spells[i]); | sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s][%s%4d%s]\n\r", send_to_char(buf, ch); | prac_buf, sprintf(buf,"%14s",how_good(ch->skills[i+1].learned)); | BLU(ch), NRM(ch), send_to_char(buf, ch); | spells[i], sprintf(buf," %4d",use_mana(ch,i+1)); | BLU(ch), NRM(ch), send_to_char(buf, ch); | how_good(ch->skills[i+1].learned), send_to_char("\n\r", ch); | BLU(ch), NRM(ch), } | use_mana(ch, i+1), > BLU(ch)); > } > page_string(ch->desc, prac_buf, 1); return(TRUE); return(TRUE); } } > number = old_search_block(arg,0,strlen(arg),spells,FALSE); number = old_search_block(arg,0,strlen(arg),spells,FALSE); if(number == -1) { if(number == -1) { send_to_char("You do not know of this spell...\n\r", ch); send_to_char("You do not know of this spell...\n\r", ch); return(TRUE); return(TRUE); } } if (GET_LEVEL(ch) < spell_info[number].min_level_cleric) { if (GET_LEVEL(ch) < spell_info[number].min_level_cleric) { send_to_char("You do not know of this spell...\n\r", ch); send_to_char("You do not know of this spell...\n\r", ch); return(TRUE); return(TRUE); } } if (ch->specials.practices <= 0) { if (ch->specials.practices <= 0) { send_to_char("You do not seem to be able to practice now.\n\r", ch); send_to_char("You do not seem to be able to practice now.\n\r", ch); return(TRUE); return(TRUE); } } if (ch->skills[number].learned >= 95) { if (ch->skills[number].learned >= 95) { send_to_char("You are already learned in this area.\n\r", ch); send_to_char("You are already learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } send_to_char("You Practice for a while...\n\r", ch); send_to_char("You Practice for a while...\n\r", ch); ch->specials.practices--; | if(ch->specials.practices>3) > ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; > percent = ch->skills[number].learned+MAX(25,int_app[GET_INT(ch)].learn); percent = ch->skills[number].learned+MAX(25,int_app[GET_INT(ch)].learn); ch->skills[number].learned = MIN(95, percent); ch->skills[number].learned = MIN(95, percent); if (ch->skills[number].learned >= 95) { if (ch->skills[number].learned >= 95) { send_to_char("You are now learned in this area.\n\r", ch); send_to_char("You are now learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } } break; } break; case CLASS_WARRIOR: { case CLASS_WARRIOR: { if (!*arg) { if (!*arg) { sprintf(buf,"You have got %d practice sessions left.\n\r", | sprintf(prac_buf,"You have got %d practice sessions left.\n\r", ch->specials.practices); ch->specials.practices); send_to_char(buf, ch); | sprintf(prac_buf,"%sYou can practice any of these skills:\n\r", prac_buf); send_to_char("You can practise any of these skills:\n\r", ch); < for(i=0; *w_skills[i] != '\n';i++) { for(i=0; *w_skills[i] != '\n';i++) { send_to_char(w_skills[i], ch); | sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s]\n\r", send_to_char(how_good(ch->skills[i+SKILL_KICK].learned), ch); | prac_buf, send_to_char("\n\r", ch); | BLU(ch), NRM(ch), > w_skills[i], > BLU(ch), NRM(ch), > how_good(ch->skills[i+SKILL_KICK].learned), > BLU(ch)); } } for(i=0; *nw_skills[i] != '\n';i++) { for(i=0; *nw_skills[i] != '\n';i++) { send_to_char(nw_skills[i],ch); | sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s]\n\r", send_to_char(how_good(ch->skills[i+SKILL_SECOND_ATTACK].learned), ch); | prac_buf, send_to_char("\n\r", ch); | BLU(ch), NRM(ch), > nw_skills[i], > BLU(ch), NRM(ch), > how_good(ch->skills[i+SKILL_SECOND_ATTACK].learned), > BLU(ch)); > } > for(i=0; *medw_skills[i] != '\n';i++) { > sprintf(prac_buf, "%s%s[%s%20s%s][%s%14s%s]\n\r", > prac_buf, > BLU(ch), NRM(ch), > medw_skills[i], > BLU(ch), NRM(ch), > how_good(ch->skills[i+SKILL_CHARGE].learned), > BLU(ch)); } } > page_string(ch->desc, prac_buf, 1); return(TRUE); return(TRUE); } } number = search_block(arg, w_skills, FALSE); number = search_block(arg, w_skills, FALSE); nnumber = search_block(arg, nw_skills, FALSE); nnumber = search_block(arg, nw_skills, FALSE); | mednumber = search_block(arg, medw_skills, FALSE); if((number == -1) && (nnumber == -1)) { | if((number == -1) && (nnumber == -1 && (mednumber == -1))) { send_to_char("You do not have ability to practise this skill!\n\r", ch); | send_to_char("You do not have ability to practice this skill!\n\r", ch); return(TRUE); return(TRUE); } } if (ch->specials.practices <= 0) { if (ch->specials.practices <= 0) { send_to_char("You do not seem to be able to practice now.\n\r", ch); send_to_char("You do not seem to be able to practice now.\n\r", ch); return(TRUE); return(TRUE); } } if (nnumber == -1) | if (nnumber == -1 && mednumber == -1) { { if (ch->skills[number+SKILL_KICK].learned >= 85) { if (ch->skills[number+SKILL_KICK].learned >= 85) { send_to_char("You are already learned in this area.\n\r", ch); send_to_char("You are already learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } send_to_char("You Practice for a while...\n\r", ch); send_to_char("You Practice for a while...\n\r", ch); ch->specials.practices--; | if(ch->specials.practices>3) > ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; > percent = ch->skills[number+SKILL_KICK].learned + percent = ch->skills[number+SKILL_KICK].learned + MIN(12, int_app[GET_INT(ch)].learn); MIN(12, int_app[GET_INT(ch)].learn); ch->skills[number+SKILL_KICK].learned = MIN(85, percent); ch->skills[number+SKILL_KICK].learned = MIN(85, percent); if (ch->skills[number+SKILL_KICK].learned >= 85) { if (ch->skills[number+SKILL_KICK].learned >= 85) { send_to_char("You are now learned in this area.\n\r", ch); send_to_char("You are now learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } } else | } else if((number == -1) && (mednumber == -1)) { { if (ch->skills[nnumber+SKILL_SECOND_ATTACK].learned >= 85) { if (ch->skills[nnumber+SKILL_SECOND_ATTACK].learned >= 85) { send_to_char("You are already learned in this area.\n\r", ch); send_to_char("You are already learned in this area.\n\r", ch); return(TRUE); return(TRUE); } } send_to_char("You Practice for a while...\n\r", ch); send_to_char("You Practice for a while...\n\r", ch); ch->specials.practices--; | if(ch->specials.practices>3) | ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; percent = ch->skills[nnumber+SKILL_SECOND_ATTACK].learned + percent = ch->skills[nnumber+SKILL_SECOND_ATTACK].learned + MIN(12, int_app[GET_INT(ch)].learn); | MIN(12, int_app[GET_INT(ch)].learn); ch->skills[nnumber+SKILL_SECOND_ATTACK].learned = MIN(85, percent); ch->skills[nnumber+SKILL_SECOND_ATTACK].learned = MIN(85, percent); < if (ch->skills[nnumber+SKILL_SECOND_ATTACK].learned >= 85) { if (ch->skills[nnumber+SKILL_SECOND_ATTACK].learned >= 85) { send_to_char("You are now learned in this area.\n\r", ch); send_to_char("You are now learned in this area.\n\r", ch); return(TRUE); return(TRUE); } | } > }else if((number==-1)&&(nnumber==-1)) > { > if (ch->skills[mednumber+SKILL_CHARGE].learned >= 85) { > send_to_char("You are already learned in this area.\n\r", ch); > return(TRUE); > } > send_to_char("You Practice for a while...\n\r", ch); > if(ch->specials.practices>3) > ch->specials.practices-=dice(1,3); > else > if(ch->specials.practices)ch->specials.practices--; > percent = ch->skills[mednumber+SKILL_CHARGE].learned + > MIN(12, int_app[GET_INT(ch)].learn); > ch->skills[mednumber+SKILL_CHARGE].learned = MIN(85, percent); > if (ch->skills[mednumber+SKILL_CHARGE].learned >= 85) { > send_to_char("You are now learned in this area.\n\r", ch); > return(TRUE); > } } } > } break; } break; } } return (TRUE); return (TRUE); } } int train(struct char_data *ch, int cmd, char *arg) int train(struct char_data *ch, int cmd, char *arg) { { char buf[256]; | char buf[MAX_STRING_LENGTH]; sbyte *pAbility = NULL; sbyte *pAbility = NULL; sbyte *pTmpAbility = NULL; sbyte *pTmpAbility = NULL; int cost = 5; | int cost = 35; /* /* * Check for right command. * Check for right command. * Strip white space on arg. * Strip white space on arg. */ */ if ( cmd != 165 ) if ( cmd != 165 ) return FALSE; return FALSE; while ( *arg == ' ' ) while ( *arg == ' ' ) arg++; arg++; if ( *arg == '\0' ) if ( *arg == '\0' ) { { sprintf( buf, "You have %d practice sessions left.\n\r", sprintf( buf, "You have %d practice sessions left.\n\r", ch->specials.practices ); ch->specials.practices ); send_to_char( buf, ch ); send_to_char( buf, ch ); > send_to_char("Training costs you 35 Practice points except for..\n\r",ch); > send_to_char("The following costs 20 practice points for classes.\n\r",ch); > send_to_char("WARRIOR str sta, MAGE int, CLERIC wis, THIEF dex sta.\n\r",ch); arg = "foo"; arg = "foo"; } } if ( !str_cmp( arg, "str" ) ) if ( !str_cmp( arg, "str" ) ) { { if ( GET_CLASS(ch) == CLASS_WARRIOR ) if ( GET_CLASS(ch) == CLASS_WARRIOR ) cost = 3; | cost = 20; pAbility = &ch->abilities.str; pAbility = &ch->abilities.str; pTmpAbility = &ch->tmpabilities.str; pTmpAbility = &ch->tmpabilities.str; } } else if ( !str_cmp( arg, "int" ) ) else if ( !str_cmp( arg, "int" ) ) { { if ( GET_CLASS(ch) == CLASS_MAGIC_USER ) if ( GET_CLASS(ch) == CLASS_MAGIC_USER ) cost = 3; | cost = 20; pAbility = &ch->abilities.intel; pAbility = &ch->abilities.intel; pTmpAbility = &ch->tmpabilities.intel; pTmpAbility = &ch->tmpabilities.intel; } } else if ( !str_cmp( arg, "wis" ) ) else if ( !str_cmp( arg, "wis" ) ) { { if ( GET_CLASS(ch) == CLASS_CLERIC ) if ( GET_CLASS(ch) == CLASS_CLERIC ) cost = 3; | cost = 20; pAbility = &ch->abilities.wis; pAbility = &ch->abilities.wis; pTmpAbility = &ch->tmpabilities.wis; pTmpAbility = &ch->tmpabilities.wis; } } else if ( !str_cmp( arg, "con" ) ) else if ( !str_cmp( arg, "con" ) ) { { pAbility = &ch->abilities.con; pAbility = &ch->abilities.con; pTmpAbility = &ch->tmpabilities.con; pTmpAbility = &ch->tmpabilities.con; } } else if ( !str_cmp( arg, "dex" ) ) else if ( !str_cmp( arg, "dex" ) ) { { if ( GET_CLASS(ch) == CLASS_THIEF ) if ( GET_CLASS(ch) == CLASS_THIEF ) cost = 3; | cost = 20; pAbility = &ch->abilities.dex; pAbility = &ch->abilities.dex; pTmpAbility = &ch->tmpabilities.dex; pTmpAbility = &ch->tmpabilities.dex; } } > else if ( !str_cmp( arg, "sta" ) ) > { > if ( GET_CLASS(ch) == CLASS_WARRIOR ) > cost = 20; > if ( GET_CLASS(ch) == CLASS_THIEF ) > cost = 20; > pAbility = &ch->abilities.sta; > pTmpAbility = &ch->tmpabilities.sta; > } > else else { { send_to_char( "You can train in: str int wis con dex.\n\r", ch ); | send_to_char( "You can train in: str int wis con dex sta.\n\r", ch ); return TRUE; return TRUE; } } if ( cost > ch->specials.practices ) if ( cost > ch->specials.practices ) { { send_to_char( "You don't have enough practices.\n\r", ch ); send_to_char( "You don't have enough practices.\n\r", ch ); return TRUE; return TRUE; } } if ( *pAbility >= 18 || *pTmpAbility >= 18 ) if ( *pAbility >= 18 || *pTmpAbility >= 18 ) { { send_to_char( "That ability is already at maximum.\n\r", ch ); send_to_char( "That ability is already at maximum.\n\r", ch ); return TRUE; return TRUE; } } ch->specials.practices -= cost; | if(ch->specials.practices>=cost) > ch->specials.practices -= cost; > else{ > send_to_char("Sorry not enough practices points left.\n\r",ch); > return TRUE; > } *pAbility += 1; *pAbility += 1; *pTmpAbility += 1; *pTmpAbility += 1; send_to_char( "Your ability increases!\n\r", ch ); send_to_char( "Your ability increases!\n\r", ch ); return TRUE; return TRUE; } } < < < int mayor(struct char_data *ch, int cmd, char *arg) < { < static char open_path[] = < "W3a3003b33000c111d0d111Oe333333Oe22c222112212111a1S."; < < static char close_path[] = < "W3a3003b33000c111d0d111CE333333CE22c222112212111a1S."; < < static char *path; < static int index; < static bool move = FALSE; < < void do_move(struct char_data *ch, char *argument, int cmd); < void do_open(struct char_data *ch, char *argument, int cmd); < void do_lock(struct char_data *ch, char *argument, int cmd); < void do_unlock(struct char_data *ch, char *argument, int cmd); < void do_close(struct char_data *ch, char *argument, int cmd); < < < if (!move) { < if (time_info.hours == 6) { < move = TRUE; < path = open_path; < index = 0; < } else if (time_info.hours == 20) { < move = TRUE; < path = close_path; < index = 0; < } < } < < if (cmd || !move || (GET_POS(ch) < POSITION_SLEEPING) || < (GET_POS(ch) == POSITION_FIGHTING)) < return FALSE; < < switch (path[index]) { < case '0' : < case '1' : < case '2' : < case '3' : < do_move(ch,"",path[index]-'0'+1); < break; < < case 'W' : < GET_POS(ch) = POSITION_STANDING; < act("$n awakens and groans loudly.", < FALSE,ch,0,0,TO_ROOM); < break; < < case 'S' : < GET_POS(ch) = POSITION_SLEEPING; < act("$n lies down and instantly falls asleep.", < FALSE,ch,0,0,TO_ROOM); < break; < < case 'a' : < act("$n says 'Hello Honey!'",FALSE,ch,0,0,TO_ROOM); < act("$n smirks.",FALSE,ch,0,0,TO_ROOM); < break; < < case 'b' : < act("$n says 'What a view! I must get something done about that dump!'", < FALSE,ch,0,0,TO_ROOM); < break; < < case 'c' : < act( < "$n says 'Vandals! Youngsters nowadays have no respect for anything!'", < FALSE,ch,0,0,TO_ROOM); < break; < < case 'd' : < act("$n says 'Good day, citizens!'", FALSE, ch, 0,0,TO_ROOM); < break; < < case 'e' : < act("$n says 'I hereby declare the bazaar open!'",FALSE,ch,0,0,TO_ROOM); < break; < < case 'E' : < act("$n says 'I hereby declare Midgaard closed!'",FALSE,ch,0,0,TO_ROOM); < break; < < case 'O' : < do_unlock(ch, "gate", 0); < do_open(ch, "gate", 0); < break; < < case 'C' : < do_close(ch, "gate", 0); < do_lock(ch, "gate", 0); < break; < < case '.' : < move = FALSE; < break; < < } < < index++; < return FALSE; < } < < /* ******************************************************************** /* ******************************************************************** * General special procedures for mobiles * * General special procedures for mobiles * ******************************************************************** */ ******************************************************************** */ /* SOCIAL GENERAL PROCEDURES /* SOCIAL GENERAL PROCEDURES If first letter of the command is '!' this will mean that the following If first letter of the command is '!' this will mean that the following command will be executed immediately. command will be executed immediately. "G",n : Sets next line to n "G",n : Sets next line to n "g",n : Sets next line relative to n, fx. line+=n "g",n : Sets next line relative to n, fx. line+=n "m",n : move to , is 0,1,2,3,4 or 5 "m",n : move to , is 0,1,2,3,4 or 5 "w",n : Wake up and set standing (if possible) "w",n : Wake up and set standing (if possible) "c",n : Look for a person named in the room "c",n : Look for a person named in the room "o",n : Look for an object named in the room "o",n : Look for an object named in the room "r",n : Test if the npc in room number ? "r",n : Test if the npc in room number ? "s",n : Go to sleep, return false if can't go sleep "s",n : Go to sleep, return false if can't go sleep "e",n : echo to the room, can use $o/$p/$N depending on "e",n : echo to the room, can use $o/$p/$N depending on contents of the **thing contents of the **thing "E",n : Send to person pointed to by thing "E",n : Send to person pointed to by thing "B",n : Send to room, except to thing "B",n : Send to room, except to thing "?",n : in [1..99]. A random chance of % success rate. "?",n : in [1..99]. A random chance of % success rate. Will as usual advance one line upon sucess, and change Will as usual advance one line upon sucess, and change relative n lines upon failure. relative n lines upon failure. "O",n : Open if in sight. "O",n : Open if in sight. "C",n : Close if in sight. "C",n : Close if in sight. "L",n : Lock if in sight. "L",n : Lock if in sight. "U",n : Unlock if in sight. */ "U",n : Unlock if in sight. */ /* Execute a social command. */ /* Execute a social command. */ void exec_social(struct char_data *npc, char *cmd, int next_line, void exec_social(struct char_data *npc, char *cmd, int next_line, int *cur_line, void **thing) int *cur_line, void **thing) { { bool ok; bool ok; void do_move(struct char_data *ch, char *argument, int cmd); void do_move(struct char_data *ch, char *argument, int cmd); void do_open(struct char_data *ch, char *argument, int cmd); void do_open(struct char_data *ch, char *argument, int cmd); void do_lock(struct char_data *ch, char *argument, int cmd); void do_lock(struct char_data *ch, char *argument, int cmd); void do_unlock(struct char_data *ch, char *argument, int cmd); void do_unlock(struct char_data *ch, char *argument, int cmd); void do_close(struct char_data *ch, char *argument, int cmd); void do_close(struct char_data *ch, char *argument, int cmd); if (GET_POS(npc) == POSITION_FIGHTING) if (GET_POS(npc) == POSITION_FIGHTING) return; return; ok = TRUE; ok = TRUE; switch (*cmd) { switch (*cmd) { case 'G' : case 'G' : *cur_line = next_line; *cur_line = next_line; return; return; case 'g' : case 'g' : *cur_line += next_line; *cur_line += next_line; return; return; case 'e' : case 'e' : act(cmd+1, FALSE, npc, *thing, *thing, TO_ROOM); act(cmd+1, FALSE, npc, *thing, *thing, TO_ROOM); break; break; case 'E' : case 'E' : act(cmd+1, FALSE, npc, 0, *thing, TO_VICT); act(cmd+1, FALSE, npc, 0, *thing, TO_VICT); break; break; case 'B' : case 'B' : act(cmd+1, FALSE, npc, 0, *thing, TO_NOTVICT); act(cmd+1, FALSE, npc, 0, *thing, TO_NOTVICT); break; break; case 'm' : case 'm' : do_move(npc, "", *(cmd+1)-'0'+1); do_move(npc, "", *(cmd+1)-'0'+1); break; break; case 'w' : case 'w' : if (GET_POS(npc) != POSITION_SLEEPING) if (GET_POS(npc) != POSITION_SLEEPING) ok = FALSE; ok = FALSE; else else GET_POS(npc) = POSITION_STANDING; GET_POS(npc) = POSITION_STANDING; break; break; case 's' : case 's' : if (GET_POS(npc) <= POSITION_SLEEPING) if (GET_POS(npc) <= POSITION_SLEEPING) ok = FALSE; ok = FALSE; else else GET_POS(npc) = POSITION_SLEEPING; GET_POS(npc) = POSITION_SLEEPING; break; break; case 'c' : /* Find char in room */ case 'c' : /* Find char in room */ *thing = get_char_room_vis(npc, cmd+1); *thing = get_char_room_vis(npc, cmd+1); ok = (*thing != 0); ok = (*thing != 0); break; break; case 'o' : /* Find object in room */ case 'o' : /* Find object in room */ *thing = get_obj_in_list_vis(npc, cmd+1, world[npc->in_room].contents); | *thing = get_obj_in_list_vis(npc, cmd+1, world[npc->in_room]->contents); ok = (*thing != 0); ok = (*thing != 0); break; break; case 'r' : /* Test if in a certain room */ case 'r' : /* Test if in a certain room */ ok = (npc->in_room == atoi(cmd+1)); ok = (npc->in_room == atoi(cmd+1)); break; break; case 'O' : /* Open something */ case 'O' : /* Open something */ do_open(npc, cmd+1, 0); do_open(npc, cmd+1, 0); break; break; case 'C' : /* Close something */ case 'C' : /* Close something */ do_close(npc, cmd+1, 0); do_close(npc, cmd+1, 0); break; break; case 'L' : /* Lock something */ case 'L' : /* Lock something */ do_lock(npc, cmd+1, 0); do_lock(npc, cmd+1, 0); break; break; case 'U' : /* UnLock something */ case 'U' : /* UnLock something */ do_unlock(npc, cmd+1, 0); do_unlock(npc, cmd+1, 0); break; break; case '?' : /* Test a random number */ case '?' : /* Test a random number */ if (atoi(cmd+1) <= number(1,100)) if (atoi(cmd+1) <= number(1,100)) ok = FALSE; ok = FALSE; break; break; default: default: break; break; } /* End Switch */ } /* End Switch */ if (ok) if (ok) (*cur_line)++; (*cur_line)++; else else (*cur_line) += next_line; (*cur_line) += next_line; } } void npc_steal(struct char_data *ch,struct char_data *victim) void npc_steal(struct char_data *ch,struct char_data *victim) { { int gold; int gold; if(IS_NPC(victim)) return; | if(IS_NPC(victim) || (GET_LEVEL(victim)>31)) return; if(GET_LEVEL(victim)>20) return; < if (AWAKE(victim) && (number(0,GET_LEVEL(ch)) == 0)) { if (AWAKE(victim) && (number(0,GET_LEVEL(ch)) == 0)) { act("You discover that $n has $s hands in your wallet.", act("You discover that $n has $s hands in your wallet.", FALSE,ch,0,victim,TO_VICT); FALSE,ch,0,victim,TO_VICT); act("$n tries to steal gold from $N.",TRUE, ch, 0, victim, TO_NOTVICT); act("$n tries to steal gold from $N.",TRUE, ch, 0, victim, TO_NOTVICT); } else { } else { /* Steal some gold coins */ /* Steal some gold coins */ gold = (int) ((GET_GOLD(victim)*number(1,10))/100); gold = (int) ((GET_GOLD(victim)*number(1,10))/100); if (gold > 0) { if (gold > 0) { GET_GOLD(ch) += gold; GET_GOLD(ch) += gold; GET_GOLD(victim) -= gold; GET_GOLD(victim) -= gold; } } } } } } int snake(struct char_data *ch, int cmd, char *arg) int snake(struct char_data *ch, int cmd, char *arg) { { void cast_poison( byte level, struct char_data *ch, char *arg, int type, void cast_poison( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ); struct char_data *tar_ch, struct obj_data *tar_obj ); if(cmd) return FALSE; if(cmd) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if ( ch->specials.fighting && if ( ch->specials.fighting && (ch->specials.fighting->in_room == ch->in_room) && (ch->specials.fighting->in_room == ch->in_room) && number(0 , 99) < 2 * GET_LEVEL(ch) ) | number(0 , 99) < 3 * GET_LEVEL(ch) ) { { act("You bite $N!", 1, ch, 0, ch->specials.fighting, TO_CHAR); act("You bite $N!", 1, ch, 0, ch->specials.fighting, TO_CHAR); act("$n bites $N!", 1, ch, 0, ch->specials.fighting, TO_NOTVICT); act("$n bites $N!", 1, ch, 0, ch->specials.fighting, TO_NOTVICT); act("$n bites you!", 1, ch, 0, ch->specials.fighting, TO_VICT); act("$n bites you!", 1, ch, 0, ch->specials.fighting, TO_VICT); cast_poison( GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, cast_poison( GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, ch->specials.fighting, 0); ch->specials.fighting, 0); return TRUE; return TRUE; } } return FALSE; return FALSE; } } int thief(struct char_data *ch, int cmd, char *arg) int thief(struct char_data *ch, int cmd, char *arg) { { struct char_data *cons; | struct char_data *cons=NULL; if(cmd) return FALSE; if(cmd) return FALSE; if(GET_POS(ch)!=POSITION_STANDING)return FALSE; if(GET_POS(ch)!=POSITION_STANDING)return FALSE; for(cons = world[ch->in_room].people; cons; cons = cons->next_in_room ) | for(cons = world[ch->in_room]->people; cons; cons = cons->next_in_room ) if((!IS_NPC(cons)) && (GET_LEVEL(cons)<32) && (number(1,5)==1)) if((!IS_NPC(cons)) && (GET_LEVEL(cons)<32) && (number(1,5)==1)) npc_steal(ch,cons); npc_steal(ch,cons); return TRUE; return TRUE; } } int magic_user(struct char_data *ch, int cmd, char *arg) | > int red_dragon(struct char_data *ch, int cmd, char *arg) { { struct char_data *vict; | struct char_data *vict=NULL; if(cmd) return FALSE; | if (cmd) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(!ch->specials.fighting) return FALSE; if(!ch->specials.fighting) return FALSE; < /* Find a dude to do evil things upon ! */ /* Find a dude to do evil things upon ! */ for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room ) | for (vict = world[ch->in_room]->people; vict; vict = vict->next_in_room ) if (vict->specials.fighting==ch && number(0,2)==0) | if (vict->specials.fighting==ch ){ break; | act("$n breathes a cone of fire, enveloping you.",1, ch, 0, 0, TO_VICT); > cast_fire_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); > } if (!vict) | if (!vict){ return FALSE; | act("$n's fiery breath scorches the area.", > 1, ch, 0, 0, TO_NOTVICT); > cast_fire_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, > ch->specials.fighting, 0); > } > return TRUE; > } if( vict!=ch->specials.fighting && GET_LEVEL(ch)>13 && number(0,7)==0 ) | int white_dragon(struct char_data *ch, int cmd, char *arg) { | { act("$n utters the words 'dilan oso'.", 1, ch, 0, 0, TO_ROOM); | struct char_data *vict=NULL; cast_sleep(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < return TRUE; < } < if( (GET_LEVEL(ch)>12) && (number(0,6)==0) ) | return FALSE; { < act("$n utters the words 'gharia miwi'.", 1, ch, 0, 0, TO_ROOM); < cast_curse(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < return TRUE; < } < if( (GET_LEVEL(ch)>7) && (number(0,5)==0) ) | if(cmd) return FALSE; { < act("$n utters the words 'koholian dia'.", 1, ch, 0, 0, TO_ROOM); < cast_blindness(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < return TRUE; < } < if( (GET_LEVEL(ch)>12) && (number(0,8)==0) && IS_EVIL(ch)) | if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; { | act("$n utters the words 'ib er dranker'.", 1, ch, 0, 0, TO_ROOM); | if(!ch->specials.fighting) return FALSE; cast_energy_drain(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < return TRUE; < } < < switch (GET_LEVEL(ch)) { < case 1: < case 2: < case 3: < case 4: < act("$n utters the words 'hahili duvini'.", 1, ch, 0, 0, TO_ROOM); < cast_magic_missile( < GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < break; < case 5: < case 6: < case 7: < case 8: < act("$n utters the words 'grynt oef'.", 1, ch, 0, 0, TO_ROOM); < cast_burning_hands( < GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < break; < case 9: < case 10: < act("$n utters the words 'sjulk divi'.", 1, ch, 0, 0, TO_ROOM); < cast_lightning_bolt( < GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < break; < case 11: < case 12: < case 13: < case 14: < act("$n utters the words 'nasson hof'.", 1, ch, 0, 0, TO_ROOM); < cast_colour_spray( < GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < break; < default: < act("$n utters the words 'tuborg'.", 1, ch, 0, 0, TO_ROOM); < cast_fireball( < GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < break; < } < return TRUE; < } < < int Thalos_citizen(struct char_data *ch, int cmd, char *arg) < { < void do_say(struct char_data *ch, char *argument, int cmd); < struct char_data *vict; < < if (!AWAKE(ch)) < return FALSE; < < for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room) < if (vict->specials.fighting==ch && number(0,1)==0) < break; < < if (!vict) < return FALSE; < < switch (number(0,20)) < { < case 0 : do_say(ch, "Thalos must be the safest city around.", 0); < return TRUE; < case 1 : do_say(ch, "Don't you just love these lamia pets?", 0); < do_say(ch, "They must be god's gift to man.", 0); < return TRUE; < case 2 : do_say(ch, "Hello, neighbor. How's the weather?", 0); < return TRUE; < case 3 : do_say(ch, "Thalos is built to last. Don't you think?", 0); < return TRUE; < case 4 : do_say(ch, "Our lamia pets will do anything.", 0); < do_say(ch, "Make our beds, serv our meals, wash the dishes,...", 0); < return TRUE; < case 5 : do_say(ch, "Have you seen the cute little beholder in", 0); < do_say(ch, "the temple. He's so cuuuute!", 0); < return TRUE; < case 6 : do_say(ch, "Oh, don't worry about the old man at the", 0); < do_say(ch, "guild house. He's insane.", 0); < return TRUE; < case 7 : do_say(ch, "That's a mighty big weapon you have there.", 0); < do_say(ch, "Off to hunt a bear?", 0); < return TRUE; < default : return FALSE; < } < } < < int baby_troll(struct char_data *ch, int cmd, char *arg) < { < struct char_data *vict; < < void do_say(struct char_data *ch, char *argument, int cmd); < < if (cmd) return FALSE; < if (!AWAKE(ch)) < return FALSE; < < if (!ch->specials.fighting) { < < for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room) < if (number(0,1)==0) < break; < < if (!vict) < return FALSE; < < switch (number(0,15)) < { < case 1 : < act( "The baby troll says, 'Wana play?'",TRUE, vict, 0, 0, TO_ROOM); < break; < case 2 : < act("The baby troll says, 'Come sit down and play with us.'", < TRUE, vict, 0, 0, TO_ROOM); < break; < case 3 : < act("The baby troll throws something greasy and grimey at $n!",\ < TRUE, vict, 0, 0, TO_ROOM); < act("The baby troll throws something greasy and grimey at you!", < TRUE,vict,0,0,TO_CHAR); < break; < default: < return FALSE; < } < } < < return FALSE; < } < < int Fanatic_Hector(struct char_data *ch, int cmd, char *arg) < { < struct char_data *vict; < < void do_say(struct char_data *ch, char *argument, int cmd); < void do_emote(struct char_data *ch, char *argument, int cmd); < < if (cmd || !AWAKE(ch)) < return FALSE; < < if (ch->specials.fighting) < return TRUE; < < for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room) < if (number(0,1)==0) < break; < < if (!vict) < return FALSE; < < switch (number(0,15)) < { < case 1 : do_say(ch, "The end of the world is comming! Beware!", 0); < return TRUE; < case 2 : do_say(ch, "To arms! To arms! Darkness is here!", 0); < return TRUE; < case 3 : do_emote(ch, < "waves his right fist covered in golden silk at you.", 0); < return TRUE; < case 4 : do_emote(ch, "spits on the banner of Thalos with disgust.", 0); < return TRUE; < default: < return FALSE; < } < } < < int Executioner(struct char_data *ch, int cmd, char *arg) < { < struct char_data *tch; < struct char_data *mob; < char buf[MAX_INPUT_LENGTH]; < char *strName; < < if (cmd || !AWAKE(ch)) < return FALSE; < < for ( tch = world[ch->in_room].people; tch; tch = tch->next_in_room ) < { < if ( IS_SET(tch->specials.affected_by, AFF_KILLER) ) < strName = "KILLER"; < else if ( IS_SET(tch->specials.affected_by, AFF_THIEF) ) < strName = "THIEF"; < else < continue; < < sprintf( buf, < "%s is a %s! PROTECT THE INNOCENT! MORE BLOOOOD!!!", < GET_NAME(tch), < strName ); < do_shout( ch, buf, 0 ); < hit( ch, tch, TYPE_UNDEFINED ); < mob = read_mobile( real_mobile(3060), REAL ); < char_to_room( mob, ch->in_room ); < mob = read_mobile( real_mobile(3060), REAL ); < char_to_room( mob, ch->in_room ); < break; < } < < return FALSE; < } < < < < int red_dragon(struct char_data *ch, int cmd, char *arg) < { < struct char_data *vict; < < return FALSE; < < if (cmd) return FALSE; < < if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; < < if(!ch->specials.fighting) return FALSE; < < /* Find a dude to do evil things upon ! */ < < for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room ) < if (vict->specials.fighting==ch && number(0,1)==0){ < act("$n breathes fire.",1, ch, 0, 0, TO_ROOM); < cast_fire_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); < } < < if (!vict) < if (number(0,1) == 0){ < act("$n breathes fire.",1, ch, 0, 0, TO_ROOM); < cast_fire_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, < ch->specials.fighting, 0); < } < < return TRUE; < } < < int white_dragon(struct char_data *ch, int cmd, char *arg) < { < struct char_data *vict; < < return FALSE; < < if(cmd) return FALSE; < < if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; < < if(!ch->specials.fighting) return FALSE; < /* Find a dude to do evil things upon ! */ /* Find a dude to do evil things upon ! */ for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room ) | for (vict = world[ch->in_room]->people; vict; vict = vict->next_in_room ) if (vict->specials.fighting==ch && number(0,1)==0){ if (vict->specials.fighting==ch && number(0,1)==0){ act("$n breathes frost.",1, ch, 0, 0, TO_ROOM); act("$n breathes frost.",1, ch, 0, 0, TO_ROOM); cast_frost_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); cast_frost_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); } } if (!vict) if (!vict) if (number(0,1) == 0){ if (number(0,1) == 0){ act("$n breathes frost.",1, ch, 0, 0, TO_ROOM); act("$n breathes frost.",1, ch, 0, 0, TO_ROOM); cast_frost_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, cast_frost_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, ch->specials.fighting, 0); ch->specials.fighting, 0); } } return TRUE; return TRUE; } } int black_dragon(struct char_data *ch, int cmd, char *arg) int black_dragon(struct char_data *ch, int cmd, char *arg) { { struct char_data *vict; struct char_data *vict; return FALSE; return FALSE; if(cmd) return FALSE; if(cmd) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(!ch->specials.fighting) return FALSE; if(!ch->specials.fighting) return FALSE; /* Find a dude to do evil things upon ! */ /* Find a dude to do evil things upon ! */ for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room ) | for (vict = world[ch->in_room]->people; vict; vict = vict->next_in_room ) if (vict->specials.fighting==ch && number(0,2)==0) if (vict->specials.fighting==ch && number(0,2)==0) break; break; if (!vict) if (!vict) if (number(0,1) == 0) if (number(0,1) == 0) { { vict = ch->specials.fighting; vict = ch->specials.fighting; if (vict == NULL) if (vict == NULL) return FALSE; return FALSE; } } else else return FALSE; return FALSE; act("$n breathes acid.",1, ch, 0, 0, TO_ROOM); act("$n breathes acid.",1, ch, 0, 0, TO_ROOM); cast_acid_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); cast_acid_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); return TRUE; return TRUE; } } int blue_dragon(struct char_data *ch, int cmd, char *arg) int blue_dragon(struct char_data *ch, int cmd, char *arg) { { struct char_data *vict; struct char_data *vict; return FALSE; return FALSE; if(cmd) return FALSE; if(cmd) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(!ch->specials.fighting) return FALSE; if(!ch->specials.fighting) return FALSE; /* Find a dude to do evil things upon ! */ /* Find a dude to do evil things upon ! */ for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room) | for (vict = world[ch->in_room]->people; vict; vict = vict->next_in_room) if (vict->specials.fighting==ch && number(0,2)==0) if (vict->specials.fighting==ch && number(0,2)==0) break; break; if (!vict) if (!vict) if (number(0,1) == 0) if (number(0,1) == 0) { { vict = ch->specials.fighting; vict = ch->specials.fighting; if (vict == NULL) if (vict == NULL) return FALSE; return FALSE; } } else else return FALSE; return FALSE; act("$n breathes lightning.",1, ch, 0, 0, TO_ROOM); act("$n breathes lightning.",1, ch, 0, 0, TO_ROOM); cast_lightning_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); cast_lightning_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); return TRUE; return TRUE; } } int green_dragon(struct char_data *ch, int cmd, char *arg) int green_dragon(struct char_data *ch, int cmd, char *arg) { { return FALSE; return FALSE; if ( cmd ) return FALSE; if ( cmd ) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(!ch->specials.fighting) return FALSE; if(!ch->specials.fighting) return FALSE; if(number(0,1)==0) return FALSE; if(number(0,1)==0) return FALSE; act("$n breathes gas.",1, ch, 0, 0, TO_ROOM); act("$n breathes gas.",1, ch, 0, 0, TO_ROOM); cast_gas_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, 0, 0); cast_gas_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, 0, 0); return TRUE; return TRUE; } } int brass_dragon(struct char_data *ch, int cmd, char *arg) int brass_dragon(struct char_data *ch, int cmd, char *arg) { { struct char_data *vict; struct char_data *vict; return FALSE; return FALSE; if ( cmd == 4 && ch->in_room == real_room(5065) ) | if ( cmd == 4 && ch->in_room == 5065 ) { { act( "The brass dragon says '$n isn't invited'", act( "The brass dragon says '$n isn't invited'", FALSE, ch, 0, 0, TO_ROOM ); FALSE, ch, 0, 0, TO_ROOM ); send_to_char( "The brass dragon says 'you're not invited'\n\r", ch ); send_to_char( "The brass dragon says 'you're not invited'\n\r", ch ); return TRUE; return TRUE; } } if ( cmd ) if ( cmd ) return FALSE; return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if(GET_POS(ch)!=POSITION_FIGHTING) return FALSE; if (!ch->specials.fighting) return FALSE; if (!ch->specials.fighting) return FALSE; if (number(0,1)==0) if (number(0,1)==0) { { act("$n breathes gas.",1,ch, 0, 0, TO_ROOM); act("$n breathes gas.",1,ch, 0, 0, TO_ROOM); cast_gas_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, 0, 0); cast_gas_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, 0, 0); return TRUE; return TRUE; } } for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room) | for (vict = world[ch->in_room]->people; vict; vict = vict->next_in_room) if (vict->specials.fighting==ch && number(0,1)==0) if (vict->specials.fighting==ch && number(0,1)==0) break; break; if (!vict) if (!vict) if (number(0,1) == 0) if (number(0,1) == 0) { { vict = ch->specials.fighting; vict = ch->specials.fighting; if (vict == NULL) if (vict == NULL) return FALSE; return FALSE; } } else else return FALSE; return FALSE; act("$n breathes lightning.",1, ch, 0, 0, TO_ROOM); act("$n breathes lightning.",1, ch, 0, 0, TO_ROOM); cast_lightning_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); cast_lightning_breath(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, vict, 0); return TRUE; return TRUE; } } > int block_way_suites(struct char_data *ch, int cmd, char *arg) > { > int room, to_room; > struct char_data *k=NULL; > char flag,people; > flag=0;people=0; > if(cmd!=1&&cmd!=2&&cmd!=3&&cmd!=4&&cmd!=5&&cmd!=6) > return FALSE; > room=ch->in_room; > if(!world[room]->dir_option[cmd-1])return FALSE; > to_room=world[room]->dir_option[cmd-1]->to_room; > if(world[to_room]->level_restriction==1){ > for (k = world[to_room]->people; k; k = k->next_in_room){ > if (IS_MOB(k))continue; > people++; > if(k==ch->master) > flag=1; > } > if(!people||flag)return FALSE; > > act( "That suite is taken, sorry.", > FALSE, ch, 0, k, TO_CHAR ); > return TRUE; > } > return FALSE; > > } /* ******************************************************************** /* ******************************************************************** * Special procedures for mobiles * * Special procedures for mobiles * ******************************************************************** */ ******************************************************************** */ > /* blocks way to any room level restrcited to 1*/ > int block_way(struct char_data *ch, int cmd, char *arg) > { > int room, to_room; > struct char_data *k=NULL; > > if (cmd>6 || cmd<1) > return FALSE; > room=ch->in_room; > if(!world[room]->dir_option[cmd-1])return FALSE; > to_room=world[room]->dir_option[cmd-1]->to_room; > if(world[to_room]->level_restriction==1){ > for (k = world[room]->people; k; k = k->next_in_room) > if ( IS_MOB(k) ) > if (mob_index[k->nr].func) > break; > if(!k)return FALSE; > > if(!IS_NPC(k)&&GET_LEVEL(k)>33){ > act( "$N bows before $n and allows $m to pass.", > FALSE, k, 0, ch, TO_ROOM ); > act( "$N bows before you, allowing you to pass.", > FALSE, k, 0, ch, TO_CHAR ); > return FALSE; > } > act( "$N shoves $n back, and blocks $s way.", > FALSE, ch, 0, k, TO_ROOM ); > act( "$N shoves you back, and blocks your way.", > FALSE, ch, 0, k, TO_CHAR ); > return TRUE; > } > return FALSE; > } int guild_guard(struct char_data *ch, int cmd, char *arg) int guild_guard(struct char_data *ch, int cmd, char *arg) { { if (cmd>6 || cmd<1) if (cmd>6 || cmd<1) return FALSE; return FALSE; if ( ( GET_CLASS(ch) != CLASS_MAGIC_USER if ( ( GET_CLASS(ch) != CLASS_MAGIC_USER && ch->in_room == real_room(3017) && cmd == 3 ) | && ch->in_room == 3017 && cmd == 3 ) || ( GET_CLASS(ch) != CLASS_CLERIC || ( GET_CLASS(ch) != CLASS_CLERIC && ch->in_room == real_room(3004) && cmd == 1 ) | && ch->in_room == 3004 && cmd == 1 ) || ( GET_CLASS(ch) != CLASS_THIEF || ( GET_CLASS(ch) != CLASS_THIEF && ch->in_room == real_room(3027) && cmd == 2 ) | && ch->in_room == 3027 && cmd == 2 ) || ( GET_CLASS(ch) != CLASS_WARRIOR || ( GET_CLASS(ch) != CLASS_WARRIOR && ch->in_room == real_room(3021) && cmd == 2 ) | && ch->in_room == 3021 && cmd == 2 ) ) ) { { act( "The guard humiliates $n, and blocks $s way.", act( "The guard humiliates $n, and blocks $s way.", FALSE, ch, 0, 0, TO_ROOM ); FALSE, ch, 0, 0, TO_ROOM ); send_to_char( send_to_char( "The guard humiliates you, and blocks your way.\n\r", ch ); "The guard humiliates you, and blocks your way.\n\r", ch ); return TRUE; return TRUE; } } return FALSE; return FALSE; } } int puff(struct char_data *ch, int cmd, char *arg) int puff(struct char_data *ch, int cmd, char *arg) { { void do_say(struct char_data *ch, char *argument, int cmd); void do_say(struct char_data *ch, char *argument, int cmd); if (cmd) if (cmd) return(0); return(0); switch (number(0, 12)) | switch (number(0, 160)) { { case 5: case 5: do_say(ch, "My god! It's full of stars!", 0); | do_say(ch, "Hey buddie, gotta bone?", 0); return(1); return(1); case 2: case 2: do_say(ch, "How'd all those fish get up here?", 0); | do_say(ch, "Hey man, been to Daddy O's today?", 0); return(1); return(1); case 8: case 8: do_say(ch, "I'm a very female dragon.", 0); | do_say(ch, "Any of you guys seen any cute female pups around here?", 0); return(1); return(1); case 9: case 9: do_say(ch, "I've got a peaceful, easy feeling.", 0); | do_say(ch, "Like WOOF!, man.", 0); > return(1); > case 10: > do_emote(ch, "scratches his ear.",0); > return(1); > case 11: > do_emote(ch, "chases his tail.",0); > return(1); > case 12: > do_emote(ch, "looks at you.",0); return(1); return(1); > case 13: > do_emote(ch, "piddles on the ground.",0); > return(1); > default: default: return(0); return(0); } } } } | int fido(struct char_data *ch, int cmd, char *arg) | int prisoner(struct char_data *ch, int cmd, char *arg) { { > void do_say(struct char_data *ch, char *argument, int cmd); struct obj_data *i, *temp, *next_obj; | if (cmd) > return(0); if (cmd || !AWAKE(ch)) | switch (number(0, 60)) return(FALSE); | { > case 5: > do_say(ch, "Please take my life and free me from this hell!", 0); > return(1); > case 2: > do_emote(ch, "struggles to get free but only causes herself more pain.",0); > return(1); > case 8: > do_emote(ch, "looks at you with pleading eyes.",0); > return(1); > case 9: > do_emote(ch, "tries to pick the lock on the shackles and gets zapped",0); > return(1); > case 10: > do_emote(ch, "sighs sadly.",0); > return(1); > case 11: > do_emote(ch, "begins to cry uncontrolably.",0); > return(1); > case 12: > do_say(ch, "If I could only kill Gith for what he has done!",0); > return(1); > case 13: > do_emote(ch, "mumbles to herself quietly.",0); > return(1); for (i = world[ch->in_room].contents; i; i = i->next_content) { | default: if (GET_ITEM_TYPE(i)==ITEM_CONTAINER && i->obj_flags.value[3]) { | return(0); act("$n savagely devours a corpse.", FALSE, ch, 0, 0, TO_ROOM); < for(temp = i->contains; temp; temp=next_obj) < { < next_obj = temp->next_content; < obj_from_obj(temp); < obj_to_room(temp,ch->in_room); < } < extract_obj(i); < return(TRUE); < } < } } return(FALSE); < } } > int towncrier(struct char_data *ch, int cmd, char *arg) > { > char buf[MAX_STRING_LENGTH]; > > void do_say(struct char_data *ch, char *argument, int cmd); > > if (cmd) > return(0); > > if(GET_POS(ch) == POSITION_FIGHTING){ > if(number(0,10)) > do_say(ch,"I declare that I die entirely too often!!",0); > return(1); > } > > switch (number(0, 20)) > { > case 1: > sprintf(buf, "I declare that Medievia now has %d rooms and %d zones!", number_of_rooms+4000000, 1+number_of_zones > do_say(ch, buf, 0); > return(1); > case 2: > do_say(ch, "Hear Ye! Hear Ye! Be it known that on the first day of\n\rthe fourth month in the year of the Dragon > return(1); > case 3: > sprintf(buf, "Let it be proclaimed throughout the land that there\n\rare now %d fair citizens in Medievia", numbe > do_say(ch, buf, 0); > return(1); > case 4: > sprintf(buf, "Hear Ye! Hear Ye! Be it known that there have been %ld passersby in Medievia since the 11th month > do_say(ch,buf,0); > return(1); > case 5: > case 6: > case 7: > sprintf(buf, "Its %d o'clock and all's well...", > ((time_info.hours % 12 == 0) ? 12 : ((time_info.hours) % 12))); > do_say(ch,buf,0); > return(1); > default: > return(0); > } > } > int janitor(struct char_data *ch, int cmd, char *arg) int janitor(struct char_data *ch, int cmd, char *arg) { { struct obj_data *i; | struct obj_data *i=NULL; if (cmd || !AWAKE(ch)) if (cmd || !AWAKE(ch)) return(FALSE); return(FALSE); for (i = world[ch->in_room].contents; i; i = i->next_content) { | for (i = world[ch->in_room]->contents; i; i = i->next_content) { if (IS_SET(i->obj_flags.wear_flags, ITEM_TAKE) && if (IS_SET(i->obj_flags.wear_flags, ITEM_TAKE) && ((i->obj_flags.type_flag == ITEM_DRINKCON) || ((i->obj_flags.type_flag == ITEM_DRINKCON) || (i->obj_flags.cost <= 10))) { (i->obj_flags.cost <= 10))) { act("$n picks up some trash.", FALSE, ch, 0, 0, TO_ROOM); act("$n picks up some trash.", FALSE, ch, 0, 0, TO_ROOM); obj_from_room(i); obj_from_room(i); obj_to_char(i, ch); obj_to_char(i, ch); return(TRUE); return(TRUE); } } } } return(FALSE); return(FALSE); } } int cityguard(struct char_data *ch, int cmd, char *arg) int cityguard(struct char_data *ch, int cmd, char *arg) { { struct char_data *tch, *evil; | struct char_data *tch=NULL, *evil=NULL; > struct char_data *next_tch=NULL; int max_evil; int max_evil; char buf[100]; | char buf[MAX_STRING_LENGTH]; if (cmd || !AWAKE(ch) || (GET_POS(ch) == POSITION_FIGHTING)) if (cmd || !AWAKE(ch) || (GET_POS(ch) == POSITION_FIGHTING)) return (FALSE); return (FALSE); max_evil = 300; max_evil = 300; evil = 0; evil = 0; for (tch=world[ch->in_room].people; tch; tch = tch->next_in_room) { | for (tch=world[ch->in_room]->people; tch; tch = next_tch) { > next_tch=tch->next_in_room; if(IS_SET(tch->specials.affected_by, AFF_KILLER)) { if(IS_SET(tch->specials.affected_by, AFF_KILLER)) { sprintf(buf, sprintf(buf, "%s is a KILLER! PROTECT THE INNOCENT! BANZAI!!! CHARGE!!! ARARARAGGGHH!", "%s is a KILLER! PROTECT THE INNOCENT! BANZAI!!! CHARGE!!! ARARARAGGGHH!", GET_NAME(tch)); GET_NAME(tch)); do_shout(ch, buf, 0); < hit(ch, tch, TYPE_UNDEFINED); hit(ch, tch, TYPE_UNDEFINED); return (TRUE); return (TRUE); } else } else if (IS_SET(tch->specials.affected_by, AFF_THIEF)) { if (IS_SET(tch->specials.affected_by, AFF_THIEF)) { sprintf(buf, sprintf(buf, "%s is a THIEF! PROTECT THE INNOCENT! BANZAI!!! CHARGE!!! ARARARAGGGHH!", "%s is a THIEF! PROTECT THE INNOCENT! BANZAI!!! CHARGE!!! ARARARAGGGHH!", GET_NAME(tch)); GET_NAME(tch)); do_shout(ch, buf, 0); < hit(ch, tch, TYPE_UNDEFINED); hit(ch, tch, TYPE_UNDEFINED); return (TRUE); return (TRUE); } } if (tch->specials.fighting) { if (tch->specials.fighting) { if ((GET_ALIGNMENT(tch) < max_evil) && if ((GET_ALIGNMENT(tch) < max_evil) && (IS_NPC(tch) || IS_NPC(tch->specials.fighting))) { | (GET_LEVEL(tch) > 6) && > (IS_NPC(tch) || IS_NPC(tch->specials.fighting))) { max_evil = GET_ALIGNMENT(tch); max_evil = GET_ALIGNMENT(tch); evil = tch; evil = tch; } } } } } } if (evil && !IS_EVIL(evil->specials.fighting)) if (evil && !IS_EVIL(evil->specials.fighting)) { { act( act( "$n screams 'PROTECT THE INNOCENT! BANZAI!!! CHARGE!!! ARARARAGGGHH!'", "$n screams 'PROTECT THE INNOCENT! BANZAI!!! CHARGE!!! ARARARAGGGHH!'", FALSE, ch, 0, 0, TO_ROOM); FALSE, ch, 0, 0, TO_ROOM); hit(ch, evil, TYPE_UNDEFINED); hit(ch, evil, TYPE_UNDEFINED); return(TRUE); return(TRUE); } } return(FALSE); return(FALSE); } } | int raven(struct char_data *ch, int cmd, char *arg) < int adept(struct char_data *ch, int cmd, char *arg) < { { struct char_data *tch; | void do_say(struct char_data *ch, char *argument, int cmd); void do_say(struct char_data *ch, char *argument, int cmd); | if (cmd) > return(0); if (cmd || !AWAKE(ch)) | switch (number(0, 15)) return(FALSE); < < for (tch = world[ch->in_room].people; tch; tch = tch->next_in_room) < if(!IS_NPC(tch) && number (0,2) == 1 && CAN_SEE(ch,tch)) < break; < < if (!tch) < return FALSE; < < switch (number (0,10)) < { { case 3 : | case 3: act("$n utters the words 'garf'.", 1, ch, 0, 0, TO_ROOM); | do_say(ch, "Nevermore", 0); cast_cure_light(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, tch, 0); | return(1); return (1); < case 7 : < act("$n utters the words 'nahk'.", 1, ch, 0, 0, TO_ROOM); < cast_bless(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, tch, 0); < return (1); < case 6 : < act("$n utters the words 'tehctah'.", 1, ch, 0, 0, TO_ROOM); < cast_armor(GET_LEVEL(ch), ch, "", SPELL_TYPE_SPELL, tch, 0); < return (1); < case 4 : < do_say(ch,"Finish school. Don't drop out.", 0); < return (1); < case 5 : < do_say(ch,"Move it. Others want to go to this school.", 0); < return (1); < default: < return (0); < } < } < < < int mud_school_adept(struct char_data *ch, int cmd, char *arg) < { < struct char_data *tch; < < void do_say(struct char_data *ch, char *argument, int cmd); < < if (cmd) < return (0); < < if (!AWAKE(ch)) < return (0); < < for (tch = world[ch->in_room].people; tch; tch = tch->next_in_room) < if(!IS_NPC(tch) && number (0,2) == 1 && CAN_SEE(ch,tch)) < break; < if (!tch) | default: return (0); | return(0); < switch (number(0,20)) < { < case 15 : < do_say(ch,"What are you staring at?", 0); < return(1); < case 18 : < do_say(ch,"Hi, I'm your friend.", 0); < return(1); < case 3 : < do_say(ch,"Isn't this a fine school?", 0); < return(1); < case 12 : < do_say(ch,"Finish school. Dont drop out.", 0); < return(1); < case 5 : < do_say(ch,"Move it. Others want to go to this school.", 0); < return(1); < case 6 : < do_say(ch,"Be careful, don't get killed by those monsters!", 0); < return(1); < case 7 : < do_say(ch,"Don't forget to wear your clothes, young students!", 0); < return(1); < case 8 : < do_say(ch,"What are you doing just STANDING there?!?!!?", 0); < do_say(ch,"GET going!", 0); < return(1); < case 9 : < do_say(ch,"Hello....Hello, are you listening to me?", 0); < return(1); < default: < return(0); < } } < } < < < < int MERCling(struct char_data *ch, int cmd, char *arg) < { < void do_shout(struct char_data *ch, char *argument, int cmd); < < if (cmd) < return(0); < < switch (number(0, 12)) < { < case 0: < do_shout(ch, "Happy Birthday to Hatchet! Happy Birthday to me!", 0); < return(1); < case 1: < do_shout(ch, "Happy Birthday to Kahn! Happy Birthday to you!", 0); < return(1); < case 2: < do_shout(ch, "Happy Birthday to Hatchet! Happy Birthday to you!", 0); < return(1); < case 3: < do_shout(ch, "Happy Birthday to Kahn! Happy Birthday to me!", 0); < return(1); < default: < return(0); < } < } } /********************************************************************* /********************************************************************* * Special procedures for shops * * Special procedures for shops * *********************************************************************/ *********************************************************************/ int pet_shops(struct char_data *ch, int cmd, char *arg) int pet_shops(struct char_data *ch, int cmd, char *arg) { { char buf[MAX_STRING_LENGTH], pet_name[256]; | char buf[MAX_STRING_LENGTH], pet_name[MAX_STRING_LENGTH]; int pet_room; int pet_room; struct char_data *pet; | struct char_data *pet=NULL; pet_room = ch->in_room+1; | pet_room = 100; if (cmd==59) { /* List */ if (cmd==59) { /* List */ send_to_char("Available pets are:\n\r", ch); send_to_char("Available pets are:\n\r", ch); for(