Welcome to the Builder Academy

Idea Hardcore Mode

More
15 Apr 2014 06:01 #4845 by Papaya Pete
Replied by Papaya Pete on topic Hardcore Mode
So I figured out what was going on and how the crash was occuring. Whenever a character dies, now it's recorded in a txt file I've added into the lib\misc folder!

Next thing I'll work on is cleaning up the command that reads that file and prints the contents whenever a player types in "fallen" to see who's died recently. The code that's in the link above works... but it makes the entire mud hang for 10 seconds or so. Great way for someone to grief everybody by typing it in over and over again.

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

More
15 Apr 2014 21:20 - 16 Apr 2014 06:11 #4846 by Papaya Pete
Replied by Papaya Pete on topic Hardcore Mode
Finished the score board snippet. Going to upload it, and next I'll be working on the hardcore mode.

... I think one could mimic the way CheesyMud did the 10 lives by using a combination of the kill counter snippet and permdeath snippet.

Edit: Wish I could update what file I uploaded and get rid of the old one. I forgot a step: adding the prototype in act.h. Open it up, and add...
Code:
ACMD(do_title); ACMD(do_visible); +ACMD(do_fallen);

Sorry for the mistake there! And caught another bug as well... it was recording even when mobs were beaten. That'd fill that file up quickly. Here's a quick fix.
Code:
+ if (!IS_NPC(ch)) scorelog(ch, killer); make_corpse(ch); extract_char(ch);
Last edit: 16 Apr 2014 06:11 by Papaya Pete.

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

More
16 Apr 2014 06:13 #4849 by Papaya Pete
Replied by Papaya Pete on topic Hardcore Mode
So I got the hardcore death coded in. ... in a rather hackneyed way. The easiest way, at least for me since I'm still getting familiar with this part of the code, is changing the STATE of the character after a death occurs in extract_char to DELCNF2 if the death counter for a character is above x number. This works... however, it will not close the connection to the mud like you'd normally expect after deleting a character. It will stay connected and you have to manually disconnect.

Tomorrow, maybe I can figure out a better way or a way to resolve this problem.

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

Time to create page: 0.497 seconds