Welcome to the Builder Academy

Question Will this snippet work as is with tba ?

More
14 Jan 2018 22:01 #7360 by JTP
What was wrong with the old version, some serious changes has been made it seems

Please Log in or Create an account to join the conversation.

More
14 Jan 2018 23:09 #7363 by Sascha
First, let me say I am so astonished that you tackled my request, and so quickly! I am grateful that you made such a comprehensive list of changes so that I, and anyone else who uses this patch, know what to do and how to do it. Thank you, thank you, thank you.

I am leaving on a business trip first thing in the morning and I don't think I'll have time to roll back the prior snippet changes and imp this one, but as soon as I get back I'm going to tackle it. I don't want you to think "Man, she asked for this and ghosted..." :) (I feel like that kid who got the perfect present on Christmas Day, only to be told I can't play with it now because we have to go to Grandma's. LOL!)

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
15 Jan 2018 02:48 #7366 by WhiskyTest
Cool Thomas, much more functionality to play with!

I did end up getting a crash at login in add_existing_clan()
Now, I did create and delete a lot of random clans - so may have just messed up my files.
But adding the below line settled it down.
Code:
void add_existing_clan(struct char_data *ch) { struct clan_data *clan = clan_list; while (clan) { if(find_clan_member(clan, GET_NAME(ch))) break; clan = clan->next; } - GET_CLAN(ch) = clan; + GET_CLAN(ch) = clan ? clan : 0; }
The following user(s) said Thank You: Sascha

Please Log in or Create an account to join the conversation.

More
21 Jan 2018 19:43 #7419 by Sascha
I was able to install this patch this morning. Works like a dream! No warnings when compiling, either. This is a super addition. Thank you again for tackling this.

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
17 Apr 2024 03:15 - 18 Apr 2024 01:38 #10388 by Fubar
There does not seem to be a check for when you send a clan message.

change the clan_tell to this:
Code:
ACMD(do_clan_tell) { if (!*argument) { send_to_char(ch, "Stimpy you iiidiot, type something!"); } else perform_clan_tell(ch, argument); }
Last edit: 18 Apr 2024 01:38 by Fubar. Reason: Posted wrong code

Please Log in or Create an account to join the conversation.

More
18 Apr 2024 23:54 - 20 Apr 2024 23:48 #10390 by Fubar
Team is used this to add to the history command
Code:
clan.c CLAN_FUNC(perform_clan_tell) { struct descriptor_data* d; char buf[MAX_STRING_LENGTH]; struct clan_data* clan = GET_CLAN(ch); if (!GET_CLAN(ch)) { send_to_char(ch, "You need to be an initiate or higher in a clan.\r\n"); return; } for (d = descriptor_list; d; d = d->next) { if (d->connected) continue; if (GET_CLAN(d->character) == GET_CLAN(ch)) { char buf2[MAX_STRING_LENGTH + 14], *msg; //*buf = '\0'; if (ch == d->character) /* from char */ sprintf(buf2, "[%s] %s:%s", clan->name, GET_NAME(ch), arg), msg = act(buf2, FALSE, d->character, 0, 0, TO_CHAR | DG_NO_TRIG), add_history(d->character, msg, HIST_CLAN); else {/* going to clan */ sprintf(buf2, "[%s] %s:%s", clan->name, GET_NAME(ch), arg); msg = act(buf2, FALSE, d->character, 0, 0, TO_CHAR | DG_NO_TRIG); add_history(d->character, msg, HIST_CLAN); } } } } Constants.c /** The names of the different channels that history is stored for. * @todo Only referenced by do_history at the moment. Should be moved local * to that function. */ const char *history_types[] = {   "all",   "say",   "gossip",   "wiznet",   "tell",   "shout",   "grats",   "holler",   "auction",   "clan",   "\n" }; Struts.h: /* History */ #define HIST_ALL       0 /**< Index to history of all channels */ #define HIST_SAY       1 /**< Index to history of all 'say' */ #define HIST_GOSSIP    2 /**< Index to history of all 'gossip' */ #define HIST_WIZNET    3 /**< Index to history of all 'wiznet' */ #define HIST_TELL      4 /**< Index to history of all 'tell' */ #define HIST_SHOUT     5 /**< Index to history of all 'shout' */ #define HIST_GRATS     6 /**< Index to history of all 'grats' */ #define HIST_HOLLER    7 /**< Index to history of all 'holler' */ #define HIST_AUCTION   8 /**< Index to history of all 'auction' */ #define HIST_CLAN      9 /**< Index to history of all 'clan' */ #define NUM_HIST       10 /**< Total number of history indexes */ #define HISTORY_SIZE   30 /**< Number of last commands kept in each history */
Last edit: 20 Apr 2024 23:48 by Fubar. Reason: Added code.
The following user(s) said Thank You: thomas

Please Log in or Create an account to join the conversation.

Time to create page: 0.243 seconds