ok sorry i'm a little rpish and how can the quest mob take the object if it's in a container? thats kinda my little thing on that i like people to rp a little even when interacting with automated mobs.
----- Original Message ----- From: "Vertigo" <[EMAIL PROTECTED]> To: "'Dale Kingston'" <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 5:14 PM Subject: RE: quest code bug > Well, you can't assume that it wouldn't be in anything. I have had > players that hide quest items in backpacks and other containers when > questing. > > Just a thought. I would put it back in. > > Vertigo > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dale > Kingston > Sent: Wednesday, July 17, 2002 4:16 AM > To: Nicholas Hutzell; ROM > Subject: Re: quest code bug > > ok time for another shoot, see this for loop > for (obj = ch->carrying; obj != NULL; obj= obj_next) > { > obj_next = obj->next_content; > if (obj && obj == ch->questobj) > { > obj_found = TRUE; > break; > } > } > > now i'm not totaly sure but if you just went got the object and was > comeing > back to the quest mob the object wouldn't be in anything so i would cut > that > obj_next = obj->next_content; and replace obj= obj_next with obj = > obj->next > and compile that and see if it works > > ----- Original Message ----- > From: "Nicholas Hutzell" <[EMAIL PROTECTED]> > To: "ROM" <[email protected]> > Sent: Wednesday, July 17, 2002 1:08 AM > Subject: quest code bug > > > > here is the quest complete code part...since the list > > wont allow me to send txt files you will have to enjoy > > this long code. > > > > > > if (!str_prefix(arg1, "complete")) > > { > > act("$n informs $N $e has completed $s quest.", ch, > > NULL, questman, TO_ROOM); > > act("You inform $N you have completed your > > quest.",ch, NULL, questman, TO_CHAR); > > > > if (ch->questgiver != questman) > > { > > act("$N tells you 'I never sent you on a quest! > > Perhaps you're thinking of " > > "someone else.'{x",ch, NULL, questman, TO_CHAR); > > return; > > } > > > > if (IS_QUESTOR(ch)) > > { > > if (!ch->questobj && !ch->questmob && ch->countdown > > > 0) > > { > > int reward = 0, > > pointreward, > > pracreward, > > trainreward, > > count = 0, > > charlevel = ch->level; > > > > for(; count <= charlevel; count += 10) > > reward += number_range(50, 300); > > > > pointreward = number_range(10, 30); > > > > act("$N tells you 'Congratulations on completing > > your quest!'{x", > > ch, NULL, questman, TO_CHAR); > > sprintf(buf, "As a reward, I am giving you %d > > quest points, and %d " > > "gold.", pointreward, reward); > > act("$N tells you '$t'{x", ch, buf, questman, > > TO_CHAR); > > > > if (chance(20)) > > { > > pracreward = number_range(1, 6); > > F2_STC("You gain %d practice%s!\n\r", pracreward, > > PLURAL(pracreward), ch) > > ch->practice += pracreward; > > } > > > > if (chance(15)) > > { > > trainreward = number_range(1, 1); > > F2_STC("You gain %d training session%s!!\n\r", > > trainreward, > > PLURAL(trainreward), ch) > > > > ch->train += trainreward; > > } > > > > if (chance(7)) /* Nyxll 10 default */ > > { > > STC("You gain a Realm Point!\n\r", ch) > > ++ch->rlp_points; > > } > > > > if (chance(11)) /* Nyxll 10 default */ > > { > > STC("You gain a Realm Token!\n\r", ch) > > ++ch->rlt_points; > > } > > > > REMOVE_BIT(ch->act, PLR_QUESTOR); > > ch->questgiver = NULL; > > ch->countdown = 0; > > > > if (ch->questmob) > > { > > ch->questmob->owner = str_dup(""); > > ch->questmob = NULL; > > } > > > > if (ch->questobj) > > extract_obj(ch->questobj); > > > > ch->nextquest = 15; > > ch->gold += reward; > > ch->questpoints += pointreward; > > ch->totalqpoints += pointreward; > > ++ch->compquests; > > return; > > } > > else if (ch->questobj && ch->countdown > 0) > > { > > bool obj_found = FALSE; > > > > for (obj = ch->carrying; obj != NULL; obj= > > obj_next) > > { > > obj_next = obj->next_content; > > > > if (obj && obj == ch->questobj) > > { > > obj_found = TRUE; > > break; > > } > > } > > > > if (obj_found) > > { > > int reward = 0, > > pointreward, > > pracreward, > > trainreward, > > count = 0, > > charlevel = ch->level, > > aotcreward; > > > > for(; count <= charlevel; count += 10) > > reward += number_range(25, 250); > > > > pointreward = number_range(10, 20); > > act("You hand $p to $N.", ch, obj, questman, > > TO_CHAR); > > act("$n hands $p to $N.", ch, obj, questman, > > TO_ROOM); > > act("$N tells you 'Congratulations on completing > > your quest!'{x", > > ch, NULL, questman, TO_CHAR); > > sprintf(buf, "As a reward, I am giving you %d > > quest points, and " > > "%d gold.", pointreward, reward); > > act("$N tells you '$t'{x", ch, buf, questman, > > TO_CHAR); > > > > if (chance(20)) > > { > > pracreward = number_range(1, 3); > > F2_STC("You gain %d practice%s!\n\r", > > pracreward, > > PLURAL(pracreward), ch) > > ch->practice += pracreward; > > } > > > > if (chance(10)) > > { > > trainreward = number_range(1, 1); > > F2_STC("You gain %d training session%s!!\n\r", > > trainreward, > > PLURAL(trainreward), ch) > > ch->train += trainreward; > > } > > > > if (chance(7)) /* Nyxll 10 default */ > > { > > aotcreward = number_range(1, 1); > > F2_STC("You gain %d Realm Point%s!!\n\r", > > aotcreward, > > PLURAL(aotcreward), ch) > > ch->rlp_points += aotcreward; > > > > } > > > > REMOVE_BIT(ch->act, PLR_QUESTOR); > > ch->questgiver = NULL; > > ch->countdown = 0; > > > > if (ch->questmob) > > { > > ch->questmob->owner = str_dup(""); > > ch->questmob = NULL; > > } > > > > if (ch->questobj) > > extract_obj(ch->questobj); > > > > ch->nextquest = 15; > > ch->gold += reward; > > ch->questpoints += pointreward; > > ch->totalqpoints += pointreward; > > ++ch->compquests; > > > > if (obj) > > extract_obj(obj); > > > > return; > > } > > else > > { > > act("$N tells you 'You haven't completed the > > quest yet, but there is " > > "still time!'{x", ch, NULL, questman, TO_CHAR); > > return; > > } > > > > return; > > } > > else if ((ch->questmob || ch->questobj) && > > ch->countdown > 0) > > { > > act("$N tells you 'You haven't completed the quest > > yet, but there is " > > "still time!'{x", ch, NULL, questman, TO_CHAR); > > return; > > } > > } > > > > if (ch->nextquest > 0) > > act("$N tells you 'But you didn't complete your > > quest in time!'{x", > > ch, NULL, questman, TO_CHAR); > > else > > act("$N tells you 'You have to 'request' a quest > > first, $n'{x", > > ch, NULL, questman, TO_CHAR); > > > > return; > > } > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Autos - Get free new car price quotes > > http://autos.yahoo.com > > > > -- > > ROM mailing list > > [email protected] > > http://www.rom.org/cgi-bin/mailman/listinfo/rom > > > > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom >

