Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ ROM
➜ Compiling the server
➜ Extreme Help
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Saint
(16 posts) Bio
|
Date
| Tue 05 Apr 2005 12:06 AM (UTC) |
Message
| Installation stuff for quest code.
--------------------------------------
------------------------------------------------------------------
/* Automated quest code originall written by Vassago (Who i'm giving
credit to despite the fact he gives no credit to the people who's code he
copies (aka the rom consortium).
Revamped by Kharas (mud@fading.tcimet.net) */
/* You need to add the following to pc_data:
sh_int quest_curr; /* current number of quest points */
int quest_accum; /* quest points accumulated in players life */
CHAR_DATA * questgiver; /* who gave the quest quest */
int questpoints;
int nextquest;
int countdown;
int questobj;
int questmob;
You need to #define PLR_QUESTING (??) in merc.h
Add a new spec_fun in special.c:
At the top add: DECLARE_SPEC_FUN( spec_questmaster );
In: const struct spec_type spec_table[] =
Add: { "spec_questmaster", spec_questmaster },
Add the following anywhere in special.c:
bool spec_questmaster( CHAR_DATA *ch )
{
return TRUE;
}
In fight.c, in the function group_gain, after all the stuff about
getting zapped by equipment, add the following:
if (!IS_NPC(gch) && IS_SET(gch->act,PLR_QUESTING )
&& IS_NPC(victim))
{
if (gch->pcdata->questmob == victim->pIndexData->vnum)
{
send_to_char("You have almost completed your quest!\n\r",gch);
send_to_char(
"Return to the questmaster before your time runs of time.\n\r",gch);
ch->pcdata->questmob = -1;
}
}
....
In save.c you need add the following in fwrite_char:
fprintf( fp, "Quest_Curr %d\n", ch->pcdata->quest_curr );
fprintf( fp, "Quest_Accum %d\n", ch->pcdata->quest_accum );
if (ch->pcdata->nextquest != 0)
fprintf( fp, "QuestNext %d\n", ch->pcdata->nextquest );
else if (ch->pcdata->countdown != 0)
fprintf( fp, "QuestNext %d\n", 10 );
in fread_char, under case 'Q': you need to add:
KEY( "Quest_Curr", ch->pcdata->quest_curr, fread_number( fp ) );
KEY( "Quest_Accum", ch->pcdata->quest_accum, fread_number( fp ) );
KEY( "QuestNext", ch->pcdata->nextquest, fread_number( fp ));
You will also need to add quest_update(); in update.c right before/after
area_update();.
This was originally modified for my smaug mud, but I think i've changed
everything so it will work with rom. Go ahead and write me if ya have
problems (mud@fading.tcimet.net)
*/
----------------------------------------------
In another post, I will post the actual quest.c file. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
7,319 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top