clan.txt
clan.txt · 5.5 KB
From the archive jeremias_clan.zip
Download the archive « Back to the archive contents
i will make this by supposing that you know a few of coding in C.
i will put the code, you have to find where it goes, by comparing your code with mine
*******
i think clan_lookup was in tables.c or something...
you should deleted it and it's declaration in tables.h i think...
******
in all these files add:
#define "clan.h"
act_comm.c
act_info.c
act_move.c
act_obj.c
act_wiz.c
db.c
handler.c
note.c
save.c
special.c
***********
act_comm.c
***********
into do_channel
if (IS_CLAN(ch) && !clan_table[ch->clan].independent)
{
send_to_char("{RClan ",ch);
if(!IS_SET(ch->comm,COMM_NOCLAN))
send_to_char("{GON{x\n\r",ch);
else
send_to_char("{ROFF{x\n\r",ch);
}
************
act_info.c
************
into do_who, do_whois, do_score add this in the way to want... you have to enter a %s for each one
i have it in this way: [ DEMON ][LEADER]
clan_table[wch->clan].who_name
IS_CLAN(wch) ? clan_rank_table[wch->rank].rank : " ",
***********
act_move.c
***********
into do_recall search these lines and add the rest below
if(!IS_CLAN(ch))
{
if((location = get_room_index( ROOM_VNUM_TEMPLE ) ) == NULL )
{
send_to_char( "You are completely lost.\n\r", ch );
return;
}
}
else /* in a clan */
{
if((location = get_room_index(clan_table[ch->clan].recall)) == NULL)
{
send_to_char( "Your clan recall room doesn't exist.\n\r", ch );
return;
}
}
***********
act_obj.c
***********
find this at the start of do_sacrifice and change it for these lines
one_argument( argument, arg );
if ( arg[0] == '\0' || !str_cmp( arg, ch->name ) )
{
act( "$n offers $mself to $t, who graciously declines.",
ch, clan_table[ch->clan].god, NULL, TO_ROOM );
sprintf( buf, "%s appreciates your offer and may accept it later.\n\r",
clan_table[ch->clan].god );
send_to_char( buf, ch );
return;
}
more below in do_sacrifice, search for these lines and replace...
if (silver == 1)
{
sprintf( buf, "%s gives you one silver coin for your sacrifice.\n\r", clan_table[ch->clan].god );
send_to_char( buf, ch );
}
else
{
sprintf(buf,"%s gives you %d silver coins for your sacrifice.\n\r", clan_table[ch->clan].god, silver);
send_to_char(buf,ch);
}
and at the end of do_sacrifice change these lines too
act( "$n sacrifices $p to $T.", ch, obj, clan_table[ch->clan].god, TO_ROOM );
wiznet("$N sends up $p as a burnt offering.", ch,obj,WIZ_SACCING,0,0);
extract_obj( obj );
return;
**************
act_wiz.c
*************
add the do_guild function i included here enterely instead the one in act_wiz.c
add these lines in do_mstat under the group containing this line
***** sprintf( buf, "{cHit: {w%d {cDam: {w%d {cSaves: {w%d {cSize: {w%s {cPosition: {w%s {cWimpy: {w%d\n\r", ******
if (is_clan(victim))
{
sprintf(buf, "{cClan: {w%s {cRank: %s {cPetition: {w%s\n\r",
clan_table[victim->clan].name,
victim->rank == MEMBER ? "{c({wnone{c){x" : clan_rank_table[victim->rank].rank,
victim->petition == INDEP ? "{c({wnone{c){x" : clan_table[victim->petition].name);
send_to_char(buf, ch);
}
***********
handler.c
***********
these two functions will stay here in handler.c without any modification
bool is_clan(CHAR_DATA *ch)
bool is_same_clan(CHAR_DATA *ch, CHAR_DATA *victim)
find this line in extract_char and changed it...
/* Death room is set in the clan table now */
if ( !fPull )
{
char_to_room(ch,get_room_index(clan_table[ch->clan].deathroom));
return;
}
**********
save.c
**********
add these in fwrite_char after RACE part
if (ch->clan)
{
fprintf( fp, "Clan %s~\n", clan_table[ch->clan].name);
fprintf( fp, "Rank %d\n", ch->rank);
}
if (ch->petition)
fprintf( fp, "Petit %s~\n", clan_table[ch->petition].name);
in Fread_char in P section after PASS add
KEY( "Petit", ch->petition, clan_lookup(fread_string(fp)));
in Fread_char in R after RACE
KEY( "Rank", ch->rank, fread_number( fp ) );
**************
special.c
**************
add this with the others delarations at the upper side
DECLARE_SPEC_FUN( spec_clan_guard ); /* JEREMIAS */
this one goes below the declar...
{ "spec_clan_guard", spec_clan_guard }, /* JEREMIAS */
and anywhere in special.c add the spec_clan_guard file included...
***************
merc.h
***************
this part is very important...
in the MAX values at the beginning
#define MAX_CLAN 10 <-this is already writed but change by 10
#define MAX_RANK 6
add these in char_data
sh_int clan;
sh_int rank; /* clan rank/status */
sh_int petition;
************
interp.c
************
everywhere you think
{ "clist", do_clanlist, POS_SLEEPING, 0, LOG_NORMAL, 1 }, /* JEREMIAS */
{ "petition", do_petition, POS_RESTING, 0, LOG_NORMAL, 1 }, /* JEREMIAS */
{ "promote", do_promote, POS_DEAD, 0, LOG_NORMAL, 1 }, /* JEREMIAS */
{ "demote", do_demote, POS_DEAD, 0, LOG_NORMAL, 1 }, /* JEREMIAS */
{ "exile", do_exile, POS_RESTING, 0, LOG_NORMAL, 1 }, /* JEREMIAS */
{ "clan", do_clantalk, POS_SLEEPING, 0, LOG_NORMAL, 1 },
{ "loner", do_loner, POS_DEAD, 0, LOG_NORMAL, 1 }, /* JEREMIAS */
in imm stuff
{ "cleader", do_cleader, POS_DEAD, L1, LOG_NORMAL, 1 }, /* JEREMIAS */
{ "guild", do_guild, POS_DEAD, L4, LOG_ALWAYS, 1 }, /* JEREMIAS */
**************
interp.h
************
everywhere but in alphabetical order...
DECLARE_DO_FUN( do_petition ); /* JEREMIAS */
and you should add one for each of the above...