Update of /cvsroot/havok/havokmud In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29103 Modified Files: Tag: rev_1_11_SQL act.comm.c act.info.c act.move.c act.obj1.c act.obj2.c act.off.c act.other.c act.social.c act.wizard.c ansi_parser.c board.c classes.c comm.c constants.c create.c create.help.c create.mob.c create.obj.c db.c dimd.c fight.c handler.c hash.c heap.c interpreter.c limits.c magic.c magic2.c magic3.c magicutils.c mail.c mind_use1.c mindskills1.c mobact.c mod.text.c modify.c multiclass.c opinion.c paginate.c parser.c pcedit.c protos.h reception.c security.c shop.c signals.c skills.c skills_mage.c skills_necromancer.c sound.c spec_assign.c spec_guildmaster.c spec_procs.c spec_procs2.c spec_procs3.c spec_procs4.c spell_parser.c spells1.c spells2.c structs.h trap.c utility.c utils.h version.h weather.c Added Files: Tag: rev_1_11_SQL Makefile.in config.h.in configure configure.ac platform.h Removed Files: Tag: rev_1_11_SQL bsd.c config.h Log Message: - Merged in from rev_1_11. Note: any typos in structures already moved to SQL will need to be done manually Index: structs.h =================================================================== RCS file: /cvsroot/havok/havokmud/structs.h,v retrieving revision 1.121.2.15.2.17 retrieving revision 1.121.2.15.2.18 diff -C2 -d -r1.121.2.15.2.17 -r1.121.2.15.2.18 *** structs.h 3 Jul 2004 04:41:43 -0000 1.121.2.15.2.17 --- structs.h 29 Jul 2004 04:40:57 -0000 1.121.2.15.2.18 *************** *** 616,620 **** */ struct obj_data { ! sh_int item_number; /* Where in data-base */ int in_room; /* In what room -1 when conta/carr */ struct obj_flag_data obj_flags; /* Object information */ --- 616,620 ---- */ struct obj_data { ! int item_number; /* Where in data-base */ int in_room; /* In what room -1 when conta/carr */ struct obj_flag_data obj_flags; /* Object information */ *************** *** 624,628 **** sh_int sector; /* for large rooms */ ! sh_int char_vnum; /* for ressurection */ long char_f_pos; /* for ressurection */ char *name; /* Title of object :get etc. */ --- 624,628 ---- sh_int sector; /* for large rooms */ ! int char_vnum; /* for ressurection */ long char_f_pos; /* for ressurection */ char *name; /* Title of object :get etc. */ *************** *** 2263,2266 **** --- 2263,2278 ---- }; + struct dragon_breath { + char *spews; + void (*func)(); + }; + + #define MAX_BREATH 2 + struct dragon_def { + int race; + struct dragon_breath breath[MAX_BREATH]; + int breathCount; + }; + struct syllable { Index: act.info.c =================================================================== RCS file: /cvsroot/havok/havokmud/act.info.c,v retrieving revision 1.150.2.39.2.9 retrieving revision 1.150.2.39.2.10 diff -C2 -d -r1.150.2.39.2.9 -r1.150.2.39.2.10 *** act.info.c 1 Jul 2004 16:02:44 -0000 1.150.2.39.2.9 --- act.info.c 29 Jul 2004 04:40:42 -0000 1.150.2.39.2.10 *************** *** 7,10 **** --- 7,11 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 60,63 **** --- 61,80 ---- } + struct obj_data *get_object_in_equip(struct char_data *ch, char *arg, + struct obj_data *equipment[], int *j) + { + for ((*j) = 0; (*j) < MAX_WEAR; (*j)++) { + if (equipment[(*j)] && isname(arg, equipment[(*j)]->name)) { + return (equipment[(*j)]); + } + } + for ((*j) = 0; (*j) < MAX_WEAR; (*j)++) { + if (equipment[(*j)] && isname2(arg, equipment[(*j)]->name)) { + return (equipment[(*j)]); + } + } + return (NULL); + } + char *find_ex_description(char *word, struct extra_descr_data *list) *************** *** 576,580 **** if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000wis floating here."); } else { strcat(buffer, "$c000w is standing here."); --- 593,597 ---- if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000w is floating here."); } else { strcat(buffer, "$c000w is standing here."); *************** *** 587,591 **** if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000wis floating here."); } else { strcat(buffer, "$c000w is sitting here."); --- 604,608 ---- if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000w is floating here."); } else { strcat(buffer, "$c000w is sitting here."); *************** *** 595,599 **** if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000wis resting here in the water."); } else { strcat(buffer, "$c000w is resting here."); --- 612,616 ---- if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000w is resting here in the water."); } else { strcat(buffer, "$c000w is resting here."); *************** *** 603,607 **** if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000wis sleeping here in the water."); } else { strcat(buffer, "$c000w is sleeping here."); --- 620,624 ---- if (real_roomp(i->in_room)->sector_type == SECT_WATER_NOSWIM) { ! strcat(buffer, "$c000w is sleeping here in the water."); } else { strcat(buffer, "$c000w is sleeping here."); *************** *** 4647,4654 **** --- 4664,4779 ---- } + + struct skill_basics + { + int skillnum; + char *name; + }; + + int skillsort(const void *s1, const void *s2) { + const struct skill_basics *s1_1 = (struct skill_basics *)s1; + const struct skill_basics *s2_2 = (struct skill_basics *)s2; + return(strcmp(s1_1->name, s2_2->name)); + } + + char *list_knowns(struct char_data *ch, int index) { + static char buf[MAX_STRING_LENGTH]; + char *output; + int skillflags = ch->skills[index].flags; + int foundskills = 0; + buf[0] = '\0'; + + if(IS_SET(skillflags, SKILL_KNOWN_BARBARIAN)) { + strcat(buf, "Barbarian "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_CLERIC)) { + strcat(buf, "Cleric "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_DRUID)) { + strcat(buf, "Druid "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_MAGE)) { + strcat(buf, "Mage "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_MONK)) { + strcat(buf, "Monk "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_NECROMANCER)) { + strcat(buf, "Necromancer "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_PALADIN)) { + strcat(buf, "Paladin "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_PSI)) { + strcat(buf, "Psionist "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_RANGER)) { + strcat(buf, "Ranger "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_SORCERER)) { + strcat(buf, "Sorcerer "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_THIEF)) { + strcat(buf, "Thief "); + foundskills = 1; + } + if(IS_SET(skillflags, SKILL_KNOWN_WARRIOR)) { + strcat(buf, "Warrior "); + foundskills = 1; + } + if(!foundskills) { + return "Miscellaneous"; + } + else { + output = buf; + return output; + } + } + + int lookthroughskillset(struct char_data *ch, + struct skill_basics foundskills[], + const struct skillset blah[], + int currentcount) { + + int j, k, alreadythere, currskillindex; + + for(j = 0; blah[j].skillnum != -1; j++) { + currskillindex = blah[j].skillnum; + if(IS_SET(ch->skills[currskillindex].flags, SKILL_KNOWN)) { + alreadythere = 0; + for(k = 0;foundskills[k].skillnum != -1 && !alreadythere;k++) { + if(currskillindex == foundskills[k].skillnum) { + alreadythere = 1; + } + } + if(!alreadythere) { + currentcount++; + foundskills[k].skillnum = currskillindex; + foundskills[k].name = blah[j].name; + } + } + } + return currentcount; + } + + void do_show_skill(struct char_data *ch, char *arg, int cmd) { char buffer[MAX_STRING_LENGTH*2]; + char buf[256]; int index; + int i; + int finalcount = 0; + struct skill_basics foundskills[MAX_SKILLS]; buffer[0] = '\0'; *************** *** 4661,4665 **** if (!arg) { ! send_to_char("You need to supply a class for that.", ch); return; } --- 4786,4829 ---- if (!arg) { ! send_to_char("Your skills currently are:\n\r", ch); ! for(i = 0;i < MAX_SKILLS;i++) { ! foundskills[i].skillnum = -1; ! } ! for(i = 0;i < MAX_CLASS;i++) { ! if(HasClass(ch, 1 << i)) { ! finalcount = lookthroughskillset(ch, foundskills, ! classes[i].skills, ! finalcount); ! if(ch->specials.remortclass == i + 1) { ! finalcount = lookthroughskillset(ch, foundskills, ! classes[i].mainskills, ! finalcount); ! } ! } ! } ! ! finalcount = lookthroughskillset(ch, foundskills, loreskills, ! finalcount); ! finalcount = lookthroughskillset(ch, foundskills, archerskills, ! finalcount); ! finalcount = lookthroughskillset(ch, foundskills, warninjaskills, ! finalcount); ! finalcount = lookthroughskillset(ch, foundskills, allninjaskills, ! finalcount); ! finalcount = lookthroughskillset(ch, foundskills, warmonkskills, ! finalcount); ! ! qsort(foundskills, finalcount, sizeof (struct skill_basics), ! skillsort); ! for(i = 0;i < finalcount;i++) { ! if((strlen(buffer) + strlen(foundskills[i].name) + 2) ! < MAX_STRING_LENGTH*2) { ! sprintf(buf, "%-20s %-20s %-40s\n\r", foundskills[i].name, ! how_good(ch->skills[foundskills[i].skillnum].learned), ! list_knowns(ch, foundskills[i].skillnum)); ! strcat(buffer, buf); ! } ! } ! page_string(ch->desc, buffer, 1); return; } *************** *** 4742,4751 **** } - /* - * this command will only be used for immorts as I am using it as a way - * to figure out how to look into rooms next to this room. Will be using - * the code for throwing items. I figure there is no IC reason for a PC - * to have a command like this. Do what ya want on your on MUD - */ void do_spot(struct char_data *ch, char *argument, int cmd) { --- 4906,4909 ---- *************** *** 4775,4779 **** struct char_data *spud; ! dlog("in do_scan"); /* --- 4933,4937 ---- struct char_data *spud; ! dlog("in do_spot"); /* *************** *** 4930,4936 **** } - /* - * morts can only spot two rooms away - */ max_range = 2; } --- 5088,5091 ---- *************** *** 4948,4956 **** sprintf(buf, "$n peers intently at $N."); sprintf(buf2, "You peer intently at $N. You sense an aura power " ! "of %ld", ! CalcPowerLevel(spud)); act(buf, FALSE, ch, 0, spud, TO_ROOM); act(buf2, FALSE, ch, 0, spud, TO_CHAR); - return; } else { --- 5103,5109 ---- sprintf(buf, "$n peers intently at $N."); sprintf(buf2, "You peer intently at $N. You sense an aura power " ! "of %ld", CalcPowerLevel(spud)); act(buf, FALSE, ch, 0, spud, TO_ROOM); act(buf2, FALSE, ch, 0, spud, TO_CHAR); return; } else { Index: shop.c =================================================================== RCS file: /cvsroot/havok/havokmud/shop.c,v retrieving revision 1.6.2.4.2.1 retrieving revision 1.6.2.4.2.2 diff -C2 -d -r1.6.2.4.2.1 -r1.6.2.4.2.2 *** shop.c 27 Jun 2004 21:12:27 -0000 1.6.2.4.2.1 --- shop.c 29 Jul 2004 04:40:54 -0000 1.6.2.4.2.2 *************** *** 1,4 **** --- 1,5 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: create.mob.c =================================================================== RCS file: /cvsroot/havok/havokmud/create.mob.c,v retrieving revision 1.14.2.6.2.1 retrieving revision 1.14.2.6.2.2 diff -C2 -d -r1.14.2.6.2.1 -r1.14.2.6.2.2 *** create.mob.c 1 Jul 2004 01:59:26 -0000 1.14.2.6.2.1 --- create.mob.c 29 Jul 2004 04:40:53 -0000 1.14.2.6.2.2 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <stdlib.h> Index: act.other.c =================================================================== RCS file: /cvsroot/havok/havokmud/act.other.c,v retrieving revision 1.82.2.24.2.2 retrieving revision 1.82.2.24.2.3 diff -C2 -d -r1.82.2.24.2.2 -r1.82.2.24.2.3 *** act.other.c 1 Jul 2004 06:48:13 -0000 1.82.2.24.2.2 --- act.other.c 29 Jul 2004 04:40:43 -0000 1.82.2.24.2.3 *************** *** 5,8 **** --- 5,9 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 195,198 **** --- 196,201 ---- 40, "H:%h R:%R> "}, { 41, "H:%h R:%R i%iI+> "}, { + 42, "$c000BR:$c000W%R $c000BZ:$c000W%z $c000BFlags:$c000W%iF" + " $c000BSect:$c000W%is $c000BI:$c000W%iI$c000B>"}, { 0, NULL}}; char buf[512]; *************** *** 818,822 **** act("$n steals $p from $N.", FALSE, ch, obj, victim, TO_NOTVICT); obj_to_char(unequip_char(victim, eq_pos), ch); ! #ifdef NODUPLICATES do_save(ch, "", 0); do_save(victim, "", 0); --- 821,825 ---- act("$n steals $p from $N.", FALSE, ch, obj, victim, TO_NOTVICT); obj_to_char(unequip_char(victim, eq_pos), ch); ! #ifndef DUPLICATES do_save(ch, "", 0); do_save(victim, "", 0); *************** *** 857,861 **** obj_to_char(obj, ch); send_to_char("Got it!\n\r", ch); ! #ifdef NODUPLICATES do_save(ch, "", 0); do_save(victim, "", 0); --- 860,864 ---- obj_to_char(obj, ch); send_to_char("Got it!\n\r", ch); ! #ifndef DUPLICATES do_save(ch, "", 0); do_save(victim, "", 0); *************** *** 2257,2261 **** } ! if (!IS_IMMORTAL(ch) && !HasClass(ch, SORCERER_LEVEL_IND)) { send_to_char("What, do you think you're a sorcerer?\n\r", ch); return; --- 2260,2264 ---- } ! if (!IS_IMMORTAL(ch) && !HasClass(ch, CLASS_SORCERER)) { send_to_char("What, do you think you're a sorcerer?\n\r", ch); return; Index: security.c =================================================================== RCS file: /cvsroot/havok/havokmud/security.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.1.2.1 diff -C2 -d -r1.4.2.1 -r1.4.2.1.2.1 *** security.c 15 Mar 2004 19:27:26 -0000 1.4.2.1 --- security.c 29 Jul 2004 04:40:54 -0000 1.4.2.1.2.1 *************** *** 1,4 **** --- 1,5 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> --- NEW FILE: Makefile.in --- ## ## The compiler your gonna use to compile this with.. ## CC=@CC@ ## LD=$(CC) ## these are architecture dependent flags CFLAGS = -g -O6 -Wall -Werror -Wno-trigraphs -ansi -pedantic ## Libraries LIBS = @LIBS@ SRCS = act.comm.c act.info.c act.move.c act.obj1.c act.obj2.c act.off.c \ act.other.c act.social.c act.wizard.c ansi_parser.c board.c \ classes.c comm.c constants.c create.c create.help.c create.mob.c \ create.obj.c db.c fight.c handler.c hash.c heap.c interpreter.c \ limits.c magic2.c magic3.c magic.c magicutils.c mail.c mindskills1.c \ mind_use1.c mobact.c modify.c mod.text.c multiclass.c opinion.c \ paginate.c parser.c reception.c security.c shop.c signals.c skills.c \ skills_mage.c skills_necromancer.c \ sound.c \ spec_assign.c spec_guildmaster.c spec_procs2.c spec_procs3.c \ spec_procs4.c spec_procs.c spell_parser.c spells1.c spells2.c trap.c \ utility.c weather.c EXE = havokmud@EXEEXT@ OBJS = ${SRCS:.c=.o} DEPS = ${SRCS:.c=.d} all : $(EXE) $(EXE) : ${OBJS} $(LD) -g -o $@ $+ ${LIBS} depend : ${DEPS} ${DEPS} : Makefile %.d: %.c @echo "Making $@ (dependencies for $<)" @${CC} -MM ${CFLAGS} $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@ .PHONY: clean cleanall clean: rm -f $(OBJS) $(EXE) cleanall: clean rm -f ${DEPS} distclean: cleanall rm -f config.status config.log Makefile config.h configure: configure.ac autoconf config.in.h: configure.in autoheader Makefile: Makefile.in configure @echo Your Makefile is out of date, rerun ./configure -include ${DEPS} Index: act.comm.c =================================================================== RCS file: /cvsroot/havok/havokmud/act.comm.c,v retrieving revision 1.35.2.9.2.1 retrieving revision 1.35.2.9.2.2 diff -C2 -d -r1.35.2.9.2.1 -r1.35.2.9.2.2 *** act.comm.c 1 Jul 2004 03:26:54 -0000 1.35.2.9.2.1 --- act.comm.c 29 Jul 2004 04:40:42 -0000 1.35.2.9.2.2 *************** *** 5,8 **** --- 5,9 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: spell_parser.c =================================================================== RCS file: /cvsroot/havok/havokmud/spell_parser.c,v retrieving revision 1.97.2.20.2.1 retrieving revision 1.97.2.20.2.2 diff -C2 -d -r1.97.2.20.2.1 -r1.97.2.20.2.2 *** spell_parser.c 24 Jun 2004 20:33:14 -0000 1.97.2.20.2.1 --- spell_parser.c 29 Jul 2004 04:40:56 -0000 1.97.2.20.2.2 *************** *** 4,7 **** --- 4,8 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <assert.h> --- NEW FILE: platform.h --- #ifndef _platform_h #define _platform_h #if defined( __CYGWIN__ ) #undef __STRICT_ANSI__ #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #ifndef __EXTENSIONS__ #define __EXTENSIONS__ #endif #endif /* * vim:ts=4:sw=4:ai:et:si:sts=4 */ Index: spec_guildmaster.c =================================================================== RCS file: /cvsroot/havok/havokmud/spec_guildmaster.c,v retrieving revision 1.10.2.15.2.2 retrieving revision 1.10.2.15.2.3 diff -C2 -d -r1.10.2.15.2.2 -r1.10.2.15.2.3 *** spec_guildmaster.c 1 Jul 2004 01:59:27 -0000 1.10.2.15.2.2 --- spec_guildmaster.c 29 Jul 2004 04:40:55 -0000 1.10.2.15.2.3 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: trap.c =================================================================== RCS file: /cvsroot/havok/havokmud/trap.c,v retrieving revision 1.5.2.3.2.1 retrieving revision 1.5.2.3.2.2 diff -C2 -d -r1.5.2.3.2.1 -r1.5.2.3.2.2 *** trap.c 27 Jun 2004 21:12:28 -0000 1.5.2.3.2.1 --- trap.c 29 Jul 2004 04:40:57 -0000 1.5.2.3.2.2 *************** *** 5,8 **** --- 5,9 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: magic.c =================================================================== RCS file: /cvsroot/havok/havokmud/magic.c,v retrieving revision 1.52.2.14 retrieving revision 1.52.2.14.2.1 diff -C2 -d -r1.52.2.14 -r1.52.2.14.2.1 *** magic.c 29 May 2004 03:20:27 -0000 1.52.2.14 --- magic.c 29 Jul 2004 04:40:53 -0000 1.52.2.14.2.1 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <assert.h> *************** *** 17,25 **** #define ASTRAL_ENTRANCE 2701 - void add_follower(struct char_data *ch, struct char_data *leader); [...1146 lines suppressed...] ! */ ! ! /* ! * DamageStuff(victim, FIRE_DAMAGE); ! */ ! ! for (burn = victim->carrying; ! burn && burn->obj_flags.type_flag != ITEM_SCROLL && ! burn->obj_flags.type_flag != ITEM_WAND && ! burn->obj_flags.type_flag != ITEM_STAFF && ! burn->obj_flags.type_flag != ITEM_BOAT; ! burn = burn->next_content) { ! if (!saves_spell(victim, SAVING_BREATH) && burn) { ! act("$p is destroyed by the exploding lozenge", 0, victim, burn, ! 0, TO_CHAR); ! extract_obj(burn); ! } ! } } Index: fight.c =================================================================== RCS file: /cvsroot/havok/havokmud/fight.c,v retrieving revision 1.120.2.19.2.4 retrieving revision 1.120.2.19.2.5 diff -C2 -d -r1.120.2.19.2.4 -r1.120.2.19.2.5 *** fight.c 30 Jun 2004 00:43:10 -0000 1.120.2.19.2.4 --- fight.c 29 Jul 2004 04:40:53 -0000 1.120.2.19.2.5 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 189,206 **** void update_pos(struct char_data *victim) { ! if ((GET_HIT(victim) > 0) && (GET_POS(victim) > POSITION_STUNNED)) { ! return; ! } else if (GET_HIT(victim) > 0) { if (!IS_AFFECTED(victim, AFF_PARALYSIS)) { if (!MOUNTED(victim)) { GET_POS(victim) = POSITION_STANDING; } - #if 0 - else GET_POS(victim) == POSITION_MOUNTED; - /* - * wasn't really doing anything.. (GH'04) - * perhaps look into it later - */ - #endif } else { GET_POS(victim) = POSITION_STUNNED; --- 190,202 ---- void update_pos(struct char_data *victim) { ! if (GET_HIT(victim) > 0) { ! if(GET_POS(victim) > POSITION_STUNNED) { ! return; ! } ! if (!IS_AFFECTED(victim, AFF_PARALYSIS)) { if (!MOUNTED(victim)) { GET_POS(victim) = POSITION_STANDING; } } else { GET_POS(victim) = POSITION_STUNNED; *************** *** 2393,2396 **** --- 2389,2393 ---- log_sev(buf, 6); } + if (IS_SET(real_roomp(victim->in_room)->room_flags, ARENA_ROOM)) { if (IS_PC(ch)) { *************** *** 2428,2443 **** victim = 0; return (TRUE); ! } else { ! if (DestroyedItems) { ! if (check_falling(victim)) { ! /* ! * 0 = ok, 1 = dead ! */ ! return (TRUE); ! } ! DestroyedItems = 0; } ! return (FALSE); } } --- 2425,2440 ---- victim = 0; return (TRUE); ! } ! ! if (DestroyedItems) { ! if (check_falling(victim)) { ! /* ! * 0 = ok, 1 = dead ! */ ! return (TRUE); } ! DestroyedItems = 0; } + return (FALSE); } *************** *** 5556,5559 **** --- 5553,5570 ---- case RACE_DRAGON_COPPER: case RACE_DRAGON_BRASS: + case RACE_DRAGON_AMETHYST: + case RACE_DRAGON_CRYSTAL: + case RACE_DRAGON_EMERALD: + case RACE_DRAGON_SAPPHIRE: + case RACE_DRAGON_TOPAZ: + case RACE_DRAGON_BROWN: + case RACE_DRAGON_CLOUD: + case RACE_DRAGON_DEEP: + case RACE_DRAGON_MERCURY: + case RACE_DRAGON_MIST: + case RACE_DRAGON_SHADOW: + case RACE_DRAGON_STEEL: + case RACE_DRAGON_YELLOW: + case RACE_DRAGON_TURTLE: case RACE_PREDATOR: case RACE_LABRAT: Index: create.c =================================================================== RCS file: /cvsroot/havok/havokmud/create.c,v retrieving revision 1.11.2.4.2.1 retrieving revision 1.11.2.4.2.2 diff -C2 -d -r1.11.2.4.2.1 -r1.11.2.4.2.2 *** create.c 28 Jun 2004 03:48:44 -0000 1.11.2.4.2.1 --- create.c 29 Jul 2004 04:40:53 -0000 1.11.2.4.2.2 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <stdlib.h> Index: opinion.c =================================================================== RCS file: /cvsroot/havok/havokmud/opinion.c,v retrieving revision 1.11.2.3.2.2 retrieving revision 1.11.2.3.2.3 diff -C2 -d -r1.11.2.3.2.2 -r1.11.2.3.2.3 *** opinion.c 1 Jul 2004 01:59:27 -0000 1.11.2.3.2.2 --- opinion.c 29 Jul 2004 04:40:53 -0000 1.11.2.3.2.3 *************** *** 5,8 **** --- 5,9 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: magicutils.c =================================================================== RCS file: /cvsroot/havok/havokmud/magicutils.c,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.2.2.1 diff -C2 -d -r1.7.2.2 -r1.7.2.2.2.1 *** magicutils.c 8 Jun 2004 23:31:58 -0000 1.7.2.2 --- magicutils.c 29 Jul 2004 04:40:53 -0000 1.7.2.2.2.1 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <assert.h> Index: skills_mage.c =================================================================== RCS file: /cvsroot/havok/havokmud/skills_mage.c,v retrieving revision 1.1.2.6.2.2 retrieving revision 1.1.2.6.2.3 diff -C2 -d -r1.1.2.6.2.2 -r1.1.2.6.2.3 *** skills_mage.c 1 Jul 2004 01:59:27 -0000 1.1.2.6.2.2 --- skills_mage.c 29 Jul 2004 04:40:55 -0000 1.1.2.6.2.3 *************** *** 4,7 **** --- 4,8 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 1709,1713 **** send_to_char("You feel less in touch with living things.\n\r", victim); } ! if (IS_AFFECTED(victim, AFF_SANCTUARY)) { if (yes || !saves_spell(victim, SAVING_SPELL)) { --- 1710,1719 ---- send_to_char("You feel less in touch with living things.\n\r", victim); } ! ! if (affected_by_spell(victim, SPELL_ENTANGLE)) { ! affect_from_char(victim, SPELL_ENTANGLE); ! send_to_char("The magical vines holding you wither away.\n\r", victim); ! } ! if (IS_AFFECTED(victim, AFF_SANCTUARY)) { if (yes || !saves_spell(victim, SAVING_SPELL)) { *************** *** 6776,6780 **** for (tar_ch = real_roomp(ch->in_room)->people; tar_ch; tar_ch = tar_ch->next_in_room) { ! if (!in_group) { spell_weakness(level, ch, tar_ch, 0); } --- 6782,6786 ---- for (tar_ch = real_roomp(ch->in_room)->people; tar_ch; tar_ch = tar_ch->next_in_room) { ! if (!in_group(tar_ch, ch)) { spell_weakness(level, ch, tar_ch, 0); } Index: paginate.c =================================================================== RCS file: /cvsroot/havok/havokmud/paginate.c,v retrieving revision 1.7.2.5.2.1 retrieving revision 1.7.2.5.2.2 diff -C2 -d -r1.7.2.5.2.1 -r1.7.2.5.2.2 *** paginate.c 3 Jul 2004 04:41:42 -0000 1.7.2.5.2.1 --- paginate.c 29 Jul 2004 04:40:53 -0000 1.7.2.5.2.2 *************** *** 10,13 **** --- 10,14 ---- #include "config.h" + #include "platform.h" #include <stdarg.h> #include <string.h> Index: parser.c =================================================================== RCS file: /cvsroot/havok/havokmud/parser.c,v retrieving revision 1.5.2.4 retrieving revision 1.5.2.4.2.1 diff -C2 -d -r1.5.2.4 -r1.5.2.4.2.1 *** parser.c 13 Apr 2004 01:43:35 -0000 1.5.2.4 --- parser.c 29 Jul 2004 04:40:53 -0000 1.5.2.4.2.1 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: spec_procs3.c =================================================================== RCS file: /cvsroot/havok/havokmud/spec_procs3.c,v retrieving revision 1.87.2.14 retrieving revision 1.87.2.14.2.1 diff -C2 -d -r1.87.2.14 -r1.87.2.14.2.1 *** spec_procs3.c 22 Jun 2004 23:53:14 -0000 1.87.2.14 --- spec_procs3.c 29 Jul 2004 04:40:56 -0000 1.87.2.14.2.1 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 31,55 **** extern int rev_dir[]; - /* - * extern procedures - */ - int choose_exit_global(int a, int b, int c); - void hit(struct char_data *ch, struct char_data *victim, int type); - void gain_exp(struct char_data *ch, int gain); - - struct char_data *FindVictim(struct char_data *ch); - struct char_data *char_holding(struct obj_data *obj); - void send_to_all(char *messg); - int IsUndead(struct char_data *ch); - struct time_info_data age(struct char_data *ch); - int CountLims(struct obj_data *obj); - struct char_data *FindAnAttacker(struct char_data *ch); - void NailThisSucker(struct char_data *ch); - int NumCharmedFollowersInRoom(struct char_data *ch); - struct char_data *FindMobDiffZoneSameRace(struct char_data *ch); - struct char_data *FindMobInRoomWithFunction(int room, int (*func) ()); - void add_follower(struct char_data *ch, - struct char_data *leader); - void stop_follower(struct char_data *ch); int randomitem(void); --- 32,35 ---- *************** *** 3925,3929 **** if (bow) { if (ch->equipment[WIELD]) { ! do_remove(ch, ch->equipment[WIELD]->name, 0); return TRUE; } else { --- 3905,3910 ---- if (bow) { if (ch->equipment[WIELD]) { ! sprintf(buf, "remove %s", ch->equipment[WIELD]->name); ! command_interpreter(ch, buf); return TRUE; } else { *************** *** 3965,3971 **** int archer_hth(struct char_data *ch) { ! struct obj_data *spid, ! *hth = NULL; ! /* * What to do if you are an archer and find yourself in HTH combat --- 3946,3952 ---- int archer_hth(struct char_data *ch) { ! struct obj_data *spid, ! *hth = NULL; ! char buf[MAX_STRING_LENGTH]; /* * What to do if you are an archer and find yourself in HTH combat *************** *** 3974,3978 **** if (ch->equipment[WIELD] && ch->equipment[WIELD]->obj_flags.type_flag == ITEM_FIREWEAPON) { ! do_remove(ch, ch->equipment[WIELD]->name, 66); return TRUE; } else { --- 3955,3960 ---- if (ch->equipment[WIELD] && ch->equipment[WIELD]->obj_flags.type_flag == ITEM_FIREWEAPON) { ! sprintf(buf, "remove %s", ch->equipment[WIELD]->name); ! command_interpreter(ch, buf); return TRUE; } else { *************** *** 5391,5395 **** if (vict->equipment[HOLD]) { ! do_remove(vict, vict->equipment[HOLD]->name, 0); sprintf(buf, "give green-key %s", GET_NAME(ch)); command_interpreter(vict, buf); --- 5373,5378 ---- if (vict->equipment[HOLD]) { ! sprintf(buf, "remove %s", vict->equipment[HOLD]->name); ! command_interpreter(vict, buf); sprintf(buf, "give green-key %s", GET_NAME(ch)); command_interpreter(vict, buf); *************** *** 6475,6479 **** "token of my appreciation.", GET_NAME(ch)); command_interpreter(vict, buf); ! do_remove(vict, vict->equipment[WIELD]->name, 0); sprintf(buf, "give Staff %s", GET_NAME(ch)); command_interpreter(vict, buf); --- 6458,6463 ---- "token of my appreciation.", GET_NAME(ch)); command_interpreter(vict, buf); ! sprintf(buf, "remove %s", vict->equipment[WIELD]->name); ! command_interpreter(vict, buf); sprintf(buf, "give Staff %s", GET_NAME(ch)); command_interpreter(vict, buf); *************** *** 7196,7200 **** "the color disappears.\n\r", ch); send_to_char("\n\r", ch); ! act("$n enters the pool and dissapears!", FALSE, ch, 0, 0, TO_ROOM); char_from_room(ch); --- 7180,7184 ---- "the color disappears.\n\r", ch); send_to_char("\n\r", ch); ! act("$n enters the pool and disappears!", FALSE, ch, 0, 0, TO_ROOM); char_from_room(ch); *************** *** 7683,7687 **** "choice."); do_say(tgt, buf, 19); ! do_remove(tgt, tgt->equipment[WEAR_HEAD]->name, 0); sprintf(buf, "give laurel-leaves-myrrhal %s", GET_NAME(ch)); --- 7667,7672 ---- "choice."); do_say(tgt, buf, 19); ! sprintf(buf, "remove %s", tgt->equipment[WEAR_HEAD]->name); ! command_interpreter(tgt, buf); sprintf(buf, "give laurel-leaves-myrrhal %s", GET_NAME(ch)); --- NEW FILE: config.h.in --- /* config.h.in. Generated from configure.ac by autoheader. */ /* Count the size of object/mob/room on saving */ #undef BYTE_COUNT /* If users are inactive, remove the rent file */ #undef CHECK_RENT_INACTIVE /* Force the mud to remove inactive mortals, demote inactive immortals at boot time */ #undef CLEAN_AT_BOOT /* To add some extra debugging stuff */ #undef DEBUG /* To allow item duplication */ #undef DUPLICATES /* Use Hash Tables for rooms (more CPU, less storage) */ #undef HASH /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII /* Define to 1 if you have the `crypt' library (-lcrypt). */ #undef HAVE_LIBCRYPT /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the <malloc.h> header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the <netinet/in.h> header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if the system has the type `socklen_t'. */ #undef HAVE_SOCKLEN_T /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* To have each 58+ god restricted to a set of sites */ #undef IMPL_SECURITY /* Makes mobs lag like players */ #undef LAG_MOBILES /* For level loss for really low experience */ #undef LEVEL_LOSS /* To limit items above a specific rent cost */ #undef LIMITED_ITEMS /* Log all actions */ #undef LOG_ALL /* Add even more info to the logs */ #undef LOG_DEBUG /* Log all mob commands sent to command_interpreter */ #undef LOG_MOB /* If you want to use a lower gold ration */ #undef LOW_GOLD /* Limit monks to 20 items */ #undef MONK_ITEM_LIMIT /* For lower experience loss at lower levels */ #undef NEWEXP /* To use the new mana/hit/move handling */ #undef NEWGAIN /* Charge 100 coins per day of rent, regardless of item types */ #undef NEW_RENT /* Enable new save world (?) */ #undef N_SAVE_WORLD /* for temp testing of reset_zon */ #undef OLD_ZONE_STUFF /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* To force new players to be authorized */ #undef PLAYER_AUTH /* Needs a description */ #undef PREP_SPELLS /* Prevents player killing */ #undef PREVENT_PKILL /* If you want to use the Quest-to-Gain system */ #undef QUEST_GAIN /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* If you want to be able to save the entire world */ #undef SAVEWORLD /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* To add site-locking commands */ #undef SITELOCK /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Clears out corrupted user files. Use periodically if at all */ #undef STRANGE_WACK /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your <sys/time.h> declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Check ego on give and gets */ #undef USE_EGOS /* Enable tracking (more CPU) */ #undef USE_TRACK /* Forces gossip/tell to only work within the local zone */ #undef ZONE_COMM_ONLY /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned' if <sys/types.h> does not define. */ #undef size_t Index: interpreter.c =================================================================== RCS file: /cvsroot/havok/havokmud/interpreter.c,v retrieving revision 1.121.2.31.2.4 retrieving revision 1.121.2.31.2.5 diff -C2 -d -r1.121.2.31.2.4 -r1.121.2.31.2.5 *** interpreter.c 1 Jul 2004 01:59:26 -0000 1.121.2.31.2.4 --- interpreter.c 29 Jul 2004 04:40:53 -0000 1.121.2.31.2.5 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <string.h> #include <ctype.h> *************** *** 1738,1741 **** --- 1739,1743 ---- if (GET_NAME(d->character)) { free(GET_NAME(d->character)); + GET_NAME(d->character) = NULL; } break; Index: spec_procs2.c =================================================================== RCS file: /cvsroot/havok/havokmud/spec_procs2.c,v retrieving revision 1.68.2.8.2.1 retrieving revision 1.68.2.8.2.2 diff -C2 -d -r1.68.2.8.2.1 -r1.68.2.8.2.2 *** spec_procs2.c 24 Jun 2004 06:34:04 -0000 1.68.2.8.2.1 --- spec_procs2.c 29 Jul 2004 04:40:56 -0000 1.68.2.8.2.2 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 4545,4581 **** me->river_speed = 0; return (TRUE); ! } else { ! if (mob_index[ch->nr].virtual >= MONK_MOB && ! mob_index[ch->nr].virtual <= MONK_MOB + 40) { ! extract_char(ch); ! /* ! * find pc in room; ! */ ! for (i = me->people; i; i = i->next_in_room) ! if (IS_PC(i)) { ! if (IS_NPC(i)) { ! command_interpreter(i, "return"); ! } ! GET_EXP(i) = ! MAX(classes[MONK_LEVEL_IND]. ! levels[GET_LEVEL(i, MONK_LEVEL_IND) + ! 1].exp + 1, GET_EXP(i)); ! GainLevel(i, MONK_LEVEL_IND); ! char_from_room(i); ! char_to_room(i, monkpreproom); ! while (me->people) { ! extract_char(me->people); ! } ! while (me->contents) { ! extract_obj(me->contents); ! } ! me->river_speed = 0; ! return (TRUE); } ! return (TRUE); ! } else { ! return (FALSE); } } } --- 4546,4579 ---- me->river_speed = 0; return (TRUE); ! } else if (mob_index[ch->nr].virtual >= MONK_MOB && ! mob_index[ch->nr].virtual <= MONK_MOB + 40) { ! extract_char(ch); ! /* ! * find pc in room; ! */ ! for (i = me->people; i; i = i->next_in_room) { ! if (IS_PC(i)) { ! if (IS_NPC(i)) { ! command_interpreter(i, "return"); ! } ! GET_EXP(i) = ! MAX(classes[MONK_LEVEL_IND]. ! levels[GET_LEVEL(i, MONK_LEVEL_IND) + ! 1].exp + 1, GET_EXP(i)); ! GainLevel(i, MONK_LEVEL_IND); ! char_from_room(i); ! char_to_room(i, monkpreproom); ! while (me->people) { ! extract_char(me->people); } ! while (me->contents) { ! extract_obj(me->contents); ! } ! me->river_speed = 0; ! return (TRUE); ! } } + return (TRUE); } } Index: mindskills1.c =================================================================== RCS file: /cvsroot/havok/havokmud/mindskills1.c,v retrieving revision 1.23.2.12 retrieving revision 1.23.2.12.2.1 diff -C2 -d -r1.23.2.12 -r1.23.2.12.2.1 *** mindskills1.c 23 May 2004 18:15:55 -0000 1.23.2.12 --- mindskills1.c 29 Jul 2004 04:40:53 -0000 1.23.2.12.2.1 *************** *** 6,9 **** --- 6,10 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <assert.h> Index: multiclass.c =================================================================== RCS file: /cvsroot/havok/havokmud/multiclass.c,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.1.2.1 diff -C2 -d -r1.16.2.1 -r1.16.2.1.2.1 *** multiclass.c 15 Mar 2004 19:27:25 -0000 1.16.2.1 --- multiclass.c 29 Jul 2004 04:40:53 -0000 1.16.2.1.2.1 *************** *** 5,8 **** --- 5,9 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> Index: mail.c =================================================================== RCS file: /cvsroot/havok/havokmud/mail.c,v retrieving revision 1.12.2.4 retrieving revision 1.12.2.4.2.1 diff -C2 -d -r1.12.2.4 -r1.12.2.4.2.1 *** mail.c 21 May 2004 13:25:39 -0000 1.12.2.4 --- mail.c 29 Jul 2004 04:40:53 -0000 1.12.2.4.2.1 *************** *** 88,91 **** --- 88,92 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <stdlib.h> Index: hash.c =================================================================== RCS file: /cvsroot/havok/havokmud/hash.c,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.3.2.1 diff -C2 -d -r1.4.2.3 -r1.4.2.3.2.1 *** hash.c 15 Jun 2004 19:06:25 -0000 1.4.2.3 --- hash.c 29 Jul 2004 04:40:53 -0000 1.4.2.3.2.1 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <stdlib.h> Index: spec_procs4.c =================================================================== RCS file: /cvsroot/havok/havokmud/spec_procs4.c,v retrieving revision 1.93.2.13.2.2 retrieving revision 1.93.2.13.2.3 diff -C2 -d -r1.93.2.13.2.2 -r1.93.2.13.2.3 *** spec_procs4.c 27 Jun 2004 21:12:28 -0000 1.93.2.13.2.2 --- spec_procs4.c 29 Jul 2004 04:40:56 -0000 1.93.2.13.2.3 *************** *** 1,3 **** --- 1,4 ---- #include "config.h" + #include "platform.h" #include <stdio.h> #include <string.h> *************** *** 13,16 **** --- 14,26 ---- */ + struct riddle_answer { + char *answer; + int reward; + char *rewardText; + }; + + int mazekeeper_riddle_common(struct char_data *ch, char *arg, + struct char_data *mob, struct riddle_answer *rid, + int ridCount, int exp, int portal); void printmap(struct char_data *ch, int x, int y, int sizex, *************** *** 5092,5096 **** } ! ch_printf(ch, "Alas, you don't seem to have any %ss to sell.\n\r", itemname); break; --- 5102,5106 ---- } ! ch_printf(ch, "Alas, you don't seem to have the %s to sell.\n\r", itemname); break; *************** *** 5690,5693 **** --- 5700,6182 ---- } + /* procs for zone 39 */ + int mazekeeper(struct char_data *ch, int cmd, char *arg, + struct char_data *mob) + { + char buf[MAX_STRING_LENGTH]; + struct obj_data *o; + int objnum; + struct char_data *i; + + if (cmd != 17 || ch == mob || !arg || !ch || !mob) { + return( FALSE ); + } + + objnum = real_object(6575); + + for( o = real_roomp(ch->in_room)->contents; o; o = o->next_content) { + if( o->item_number == objnum ) { + return( FALSE ); + } + } + + if (!strcasecmp(arg, "yes")) { + for (i = real_roomp(ch->in_room)->people; i; + i = i->next_in_room) { + if (IS_FOLLOWING(ch, i) && GetMaxLevel(i) >= 41) { + strcpy( buf, "say Your group is far too powerfull to enter!"); + command_interpreter(mob, buf); + return( TRUE ); + } + } + strcpy(buf, "say Wonderful!! Let us begin!"); + command_interpreter(mob, buf); + act("$c000WThe mazekeeper utters strange words and traces arcane" + " symbols in the air.$c000w", FALSE, mob, 0, 0, TO_ROOM); + act("$c000WSuddenly a large portal opens!$c000w", + FALSE, mob, 0, 0, TO_ROOM); + o = read_object(6575, VIRTUAL); + obj_to_room(o, ch->in_room); + return(TRUE); + } + + if (!strcasecmp(arg, "no")) { + strcpy(buf, "say Fine, if you don't want to play, you can die now!"); + command_interpreter(mob, buf); + sprintf(buf, "kill %s", GET_NAME(ch)); + command_interpreter(mob, buf); + return(TRUE); + } + return(FALSE); + } + + + int mazekeeper_riddle_master(struct char_data *ch, int cmd, char *arg, + struct char_data *mob) + { + char buf[MAX_STRING_LENGTH]; + char *argument = NULL, + *arg1, + *arg2; + struct obj_data *o; + int ret = FALSE; + int objnum; + + if (!ch || !mob || mob == ch || cmd != 83 || !arg) { + return(FALSE); + } + + objnum = real_object(6580); + + for( o = real_roomp(ch->in_room)->contents; o; o = o->next_content) { + if( o->item_number == objnum ) { + return( FALSE ); + } + } + + + /* Keep the original arg for the caller in case we don't return TRUE */ + argument = strdup(arg); + arg = argument; + + arg = get_argument(arg, &arg1); + arg = get_argument(arg, &arg2); + + if (arg2 && !strcasecmp(arg2, "tomorrow")) { + strcpy(buf, "say That is correct!"); + command_interpreter(mob, buf); + strcpy(buf, "say I must say, I am impressed."); + command_interpreter(mob, buf); + strcpy(buf, "say It has been a very long time since the last " + "adventurer made it this far."); + command_interpreter(mob, buf); + strcpy(buf, "say Your reward is this armor crafted from special " + "ore found deep in our mines many years ago."); + command_interpreter(mob, buf); + strcpy(buf, "say Use it wisely, friend. So long, and fare thee " + "well"); + command_interpreter(mob, buf); + + o = read_object(6593, VIRTUAL); + obj_to_char(o, ch); + gain_exp(ch, 150000); + + act("The riddle master waves his hand and a shimmering portal " + "appears.", FALSE, mob, NULL, NULL, TO_ROOM); + act("Somehow you know that your journey has come to an end, and" + "the portal is the way home.", FALSE, mob, NULL, NULL, TO_ROOM); + + o = read_object(6580, VIRTUAL); + obj_to_room(o, ch->in_room); + ret = TRUE; + } + + free(argument); + return(ret); + } + + + int mazekeeper_riddle_common(struct char_data *ch, char *arg, + struct char_data *mob, struct riddle_answer *rid, + int ridCount, int exp, int portal) + { + char buf[MAX_STRING_LENGTH]; + char *argument = NULL, + *arg1, + *arg2; + struct obj_data *o; + int ret = FALSE; + int i; + + /* Keep the original arg for the caller in case we don't return TRUE */ + argument = strdup(arg); + arg = argument; + + arg = get_argument(arg, &arg1); + arg = get_argument(arg, &arg2); + + if (!arg2) { + free( argument ); + return( FALSE ); + } + + for( i = 0; i < ridCount && !ret; i++ ) { + if( !strcasecmp(arg2, rid[i].answer ) ) { + strcpy(buf, "say Excellent, you are correct!"); + command_interpreter(mob, buf); + sprintf(buf, "say Take this %s as a reward.", rid[i].rewardText); + command_interpreter(mob, buf); + strcpy(buf, "say You may now move on to the next challenge, good " + "luck!"); + command_interpreter(mob, buf); + + o = read_object(rid[i].reward, VIRTUAL); + obj_to_char(o, ch); + gain_exp(ch, exp); + sprintf(buf, "$c000BYou receive $c000W%d $c000Bexperience!$c000w", + exp); + act(buf, FALSE, ch, 0, 0, TO_CHAR); + GET_GOLD(ch) = (GET_GOLD(ch) + exp); + sprintf(buf, "$c000BYou receive $c000W%d $c000Bgold coins!$c000w", + exp); + act(buf, FALSE, ch, 0, 0, TO_CHAR); + + act("The riddler speaks in a strange language and traces an " + "arcane symbol in the air.", FALSE, mob, 0, 0, TO_ROOM); + act("A large portal opens in front of you!", + FALSE, mob, 0, 0, TO_ROOM); + + o = read_object(portal, VIRTUAL); + obj_to_room(o, ch->in_room); + + act("The riddler disapears in a puff of smoke!", + FALSE, mob, NULL, NULL, TO_ROOM); + char_from_room(mob); + extract_char(mob); + ret = TRUE; + } + } + + if( !ret ) { + strcpy(buf, "say HAH! Wrong answer, now you will die!"); + command_interpreter(mob, buf); + sprintf(buf, "kill %s", GET_NAME(ch)); + command_interpreter(mob, buf); + ret = TRUE; + } + + free( argument ); + return(ret); + } + + + int mazekeeper_riddle_one(struct char_data *ch, int cmd, char *arg, + struct char_data *mob) + { + static struct riddle_answer rid[] = { + { "doll", 6581, "earring" }, + { "needle", 6582, "earring" }, + { "storm", 6583, "earring" } + }; + + if (!ch || !mob || mob == ch || cmd != 83 || !arg) { + return(FALSE); + } + + return( mazekeeper_riddle_common(ch, arg, mob, rid, NELEMS(rid), + 10000, 6576) ); + } + + int mazekeeper_riddle_two(struct char_data *ch, int cmd, char *arg, + struct char_data *mob) + { + static struct riddle_answer rid[] = { + { "breath", 6584, "ring" }, + { "tongue", 6585, "ring" }, + { "temper", 6586, "ring" } + }; + + if (!ch || !mob || mob == ch || cmd != 83 || !arg) { + return(FALSE); + } + + return( mazekeeper_riddle_common(ch, arg, mob, rid, NELEMS(rid), + 25000, 6577) ); + } + + int mazekeeper_riddle_three(struct char_data *ch, int cmd, char *arg, + struct char_data *mob) + { + static struct riddle_answer rid[] = { + { "time", 6587, "necklace" }, + { "temperature", 6588, "necklace" }, + { "pressure", 6589, "necklace" } + }; + + if (!ch || !mob || mob == ch || cmd != 83 || !arg) { + return(FALSE); + } + + return( mazekeeper_riddle_common(ch, arg, mob, rid, NELEMS(rid), + 50000, 6578) ); + } + + int mazekeeper_riddle_four(struct char_data *ch, int cmd, char *arg, + struct char_data *mob) + { + static struct riddle_answer rid[] = { + { "star", 6590, "bracelet" }, + { "sleep", 6591, "bracelet" }, + { "dream", 6592, "bracelet" } + }; + + if (!ch || !mob || mob == ch || cmd != 83 || !arg) { + return(FALSE); + } + + return( mazekeeper_riddle_common(ch, arg, mob, rid, NELEMS(rid), + 100000, 6579) ); + } + + int level_limiter(struct char_data *ch, int cmd, char *argument, + struct obj_data *obj, int type) + { + char buf[MAX_STRING_LENGTH]; + int dam = 0, + i; + char *arg, *arg1; + int zapit = FALSE; + int inroom = FALSE; + struct obj_data *tmp_obj; + + if( !ch || !obj ) { + return( FALSE ); + } + + if( (!obj->carried_by && !obj->equipped_by && !obj->in_obj)) { + /* Zap this bitch, it's in a room not on a char */ + zapit = TRUE; + inroom = TRUE; + } + + switch( cmd ) { + case 72: /* give */ + case 304: /* auction */ + case 514: /* donate */ + case 57: /* sell */ + case 67: /* put */ + arg = strdup(argument); + argument = arg; + + argument = get_argument(argument, &arg1); + if( arg1 ) { + tmp_obj = get_obj_in_list(arg1, ch->carrying); + if( obj != tmp_obj && strncasecmp(arg1, "all", 3)) { + free(arg); + return(FALSE); + } + + zapit = TRUE; + inroom = TRUE; + } + free(arg); + break; + default: + break; + } + + if( IS_IMMORTAL(ch) ) { + return( FALSE ); + } + + if (GetMaxLevel(ch) >= 41) { + strcpy(buf, "The $p takes an intense disliking to you and explodes, " + "burning you severely!"); + act(buf, FALSE, ch, obj, NULL, TO_CHAR); + + dam = 5 * (GetMaxLevel(ch) - 41); + dam = MIN( dam, GET_HIT(ch) / 2 ); + dam = MAX( dam, 0 ); + + DoDamage(ch, ch, dam, SPELL_FIRESHIELD); + + zapit = TRUE; + } + + if( zapit ) { + strcpy(buf, "The $p explodes in a large ball of flame and a loud " + "BANG!" ); + act(buf, FALSE, ch, obj, NULL, TO_ROOM); + if( inroom ) { + act(buf, FALSE, ch, obj, NULL, TO_CHAR); + } + + sprintf( buf, "%s exploded %s and took %d damage", GET_NAME(ch), + obj->name, dam ); + Log( buf ); + + if( obj->carried... [truncated message content] |