GBoardInstall.txt
GBoardInstall.txt · 8.4 KB
From the archive global_boards.zip
Download the archive « Back to the archive contents
Global Message Boards v1.0 Install Guide
What this does:
This is quite similar to the stock board system in SWR. Whats different with this one is
that its more OOC than anything. A player can access a board from anywhere on the MUD and leave
whatever kind of messages they so desire. This is a fairly easy snippet to plug in, or at least
I hope it is, I made it as easy as I possibly could.
What you will need to change:
comm.c
gboard.c <-- needs to be added
gboard.h <-- needs to be added
Makefile
mud.h
save.c
tables.c
*Always remember to backup the files you will change incase of an error with installation, or
an error with the code.
cp <filename> <newfilename>.bak
What you will need to add:
gboard.c and gboard.h
../gnotes DIRECTORY (basically type cd <main directory> then mkdir gnotes
../gnotes will need the boards added, such as General, Ideas, etc.. which can be added by typing,
pico General (then typing a letter or number and erasing it, then you will be asked to save
it on exit, save it, do the same for General, News, Questions, Announce, Immortal, and Personal)
-------------------------------------------------------------------------------------------------
comm.c
Find,
if( dclose->connected == CON_PLAYING || dclose->connected == CON_EDITING )
{
act( AT_ACTION, "$n has lost $s link.", ch, NULL, NULL, TO_ROOM );
ch->desc = NULL;
}
Change it to look like this,
if ( (dclose->connected == CON_PLAYING
|| dclose->connected == CON_EDITING)
||(dclose->connected >= CON_NOTE_TO
&& dclose->connected <= CON_NOTE_FINISH) )
{
act( AT_ACTION, "$n has lost $s link.", ch, NULL, NULL, TO_ROOM );
ch->desc = NULL;
}
Find the void nanny function and then find,
bool fOld, chk;
Below that add,
if( d->connected != CON_NOTE_TEXT )
{
while ( isspace(*argument) )
argument++;
}
Find,
act( AT_ACTION, "$n has entered the game.", ch, NULL, NULL, TO_ROOM );
do_look( ch, "auto" );
Below that add,
do_global_boards( ch, "" );
ch->pcdata->board = &boards[DEFAULT_BOARD];
Find,
mail_count(ch);
break;
Below that add,
case CON_NOTE_TO:
handle_con_note_to (d, argument);
break;
case CON_NOTE_SUBJECT:
handle_con_note_subject (d, argument);
break; /* subject */
case CON_NOTE_EXPIRE:
handle_con_note_expire (d, argument);
break;
case CON_NOTE_TEXT:
handle_con_note_text (d, argument);
break;
case CON_NOTE_FINISH:
handle_con_note_finish (d, argument);
break;
-------------------------------------------------------------------------------------------------
Makefile
add gboard.c into the compiling list
-------------------------------------------------------------------------------------------------
mud.h
Find, /* defines for new do_who */
#define WT_MORTAL 0
#define WT_IMM 2
#define WT_AVATAR 1
#define WT_NEWBIE 3
Below that add,
#include "gboard.h"
Find,
CON_STATS_OK
Changes that to look like,
CON_STATS_OK,
Then add,
CON_NOTE_TO, CON_NOTE_SUBJECT, CON_NOTE_EXPIRE,
CON_NOTE_TEXT, CON_NOTE_FINISH
Find the note_data structure and add to the bottom,
time_t expire;
time_t date_stamp;
Find the pc_data structure and then find,
AREA_DATA * area;
Below it add,
GLOBAL_BOARD_DATA * board; /* The current board */
time_t last_note[MAX_BOARD]; /* last note for the boards */
NOTE_DATA * in_progress; /* In progress of using notes */
Find,
DECLARE_DO_FUN( do_glance );
Below it add,
DECLARE_DO_FUN( do_global_boards);
DECLARE_DO_FUN( do_global_note );
DECLARE_DO_FUN( do_gcatchup );
DECLARE_DO_FUN( do_glist );
DECLARE_DO_FUN( do_gread );
DECLARE_DO_FUN( do_gremove );
DECLARE_DO_FUN( do_gwrite );
Find,
/* board.c */
NOTE_DATA *note_free;
Below that add,
/* gboard.c */
void free_global_note args( (NOTE_DATA *note) );
NOTE_DATA *note_free;
-------------------------------------------------------------------------------------------------
save.c
Find,
void fwrite_char( CHAR_DATA *ch, FILE *fp )
Then find,
int sn, track, drug;
Make it look like this,
int sn, track, drug, i;
Find,
if ( ch->pcdata->pagerlen != 24 )
fprintf( fp, "Pagerlen %d\n", ch->pcdata->pagerlen );
Below it add,
fprintf (fp, "Boards %d ", MAX_BOARD);
for (i = 0; i < MAX_BOARD; i++)
fprintf (fp, "%s %ld ", boards[i].short_name,ch->pcdata->last_note[i]);
Find,
ch->pcdata->pwd = str_dup( "" );
Below it add,
ch->pcdata->board = &boards[DEFAULT_BOARD];
Find,
KEY( "Bank", ch->pcdata->bank, fread_number( fp ) );
Below it add,
if (!str_cmp(word, "Boards" ))
{
int i,num = fread_number (fp);
char *boardname;
for (; num ; num-- )
{
boardname = fread_word (fp);
i = board_lookup (boardname);
if (i == BOARD_NOTFOUND)
{
sprintf (buf, "fread_char: %s had unknown board name: %s. Skipped.", ch->name, boardname);
log_string (buf);
fread_number (fp);
}
else
ch->pcdata->last_note[i] = fread_number (fp);
}
fMatch = TRUE;
}
-------------------------------------------------------------------------------------------------
tables.c
Find,
case 'g': (you can add these alphabetically or add them like this)
Below it add,
if ( !str_cmp( name, "do_gcatchup" )) return do_gcatchup;
if ( !str_cmp( name, "do_glist" )) return do_glist;
if ( !str_cmp( name, "do_gread" )) return do_gread;
if ( !str_cmp( name, "do_gremove" )) return do_gremove;
if ( !str_cmp( name, "do_gwrite" )) return do_gwrite;
if ( !str_cmp( name, "do_global_boards" )) return do_global_boards;
if ( !str_cmp( name, "do_global_note" )) return do_global_note;
Find,
if ( skill == do_freeze ) return "do_freeze";
Below it add,
if ( skill == do_gcatchup ) return "do_gcatchup";
if ( skill == do_glist ) return "do_glist";
if ( skill == do_gread ) return "do_gread";
if ( skill == do_gremove ) return "do_gremove";
if ( skill == do_gwrite ) return "do_gwrite";
if ( skill == do_global_boards ) return "do_global_boards";
if ( skill == do_global_note ) return "do_global_note";
-------------------------------------------------------------------------------------------------
make clean
make
copyover/reboot now
cedit gboard create do_global_boards
cedit gboard level 1
cedit gnote create do_global_note
cedit gnote level 1
cedit gremove create
cedit gremove level 103
HELP_FILE Format!!
The helpfile for gnote should look something like this,
===========================================================================
Syntax: gnote
Syntax: gnote read <number>
Syntax: gnote list
Syntax: gnote write
Syntax: gnote catchup
When you have unread messages, type GNOTE by itself to cycle through all
of the boards and you will read all unread messages.
To read a specific note, type GNOTE READ <note number> to read that note.
If you want to see a list of the notes of a specific board, type GNOTE LIST
on whichever board you want.
When you want to write a note on the global board, make sure to use GBOARD
[board name] first, then type GNOTE WRITE and you will enter the descriptor.
Too many notes to read? Type GNOTE CATCHUP to cancel them all.
============================================================================
Any problems please contact me at the provided email address,
-,,,.,,,,-
_'Diablo'_ Star Wars Development
''''''
[*]------------------------------------------------[*]
||| If you have any problems please contact me at: |||
||| crazy_mike_316@hotmail.com |||
[*]------------------------------------------------[*]