Welcome to the Builder Academy

Question Corpses

More
10 Dec 2017 15:15 #7229 by JTP
Corpses was created by JTP
Code:
Hmm ok im playing with even more corpse messages... i made a switch: switch (killedbytype) { case SPELL_FIRESHIELD: case SPELL_FIREBALL:sprintf(spec_desc,"smoldering remains of %s are", (IS_NPC(ch) ? ch->player.short_descr : GET_NAME(ch))); break; default:sprintf(spec_desc,"corpse of %s is", (IS_NPC(ch) ? ch->player.short_descr : GET_NAME(ch))); break; } changed: } else { corpse->name = strdup("corpse"); snprintf(buf2, sizeof(buf2), "The %s lying here.", spec_desc); <<<---New /* snprintf(buf2, sizeof(buf2), "The corpse of %s is lying here.", GET_NAME(ch)); */ <<<--- Old corpse->description = strdup(buf2); snprintf(buf2, sizeof(buf2), "the corpse of %s", GET_NAME(ch)); corpse->short_description = strdup(buf2); } Got it to compile, i had to add: void make_corpse(struct char_data *ch, int killedbytype); void raw_kill(struct char_data *ch,int killedbytype); void die(struct char_data *ch,int killedbytype); Also i had to add: make_corpse(ch, killedbytype); And added 0 to a bunch of die places and raw_kill like: raw_kill(vict, ch, 0); What is best to add 0 or NULL ?? But killing a mob with fireball just got the corpse the default message....Any ideas ??

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

More
11 Dec 2017 00:44 #7231 by WhiskyTest
Replied by WhiskyTest on topic Corpses
Probably 'killedbytype' doesnt equal 'SPELL_FIRESHIELD' or 'SPELL_FIREBALL'

You could test that the corpse code works correctly by sending SPELL_FIREBALL no matter what, like:
make_corpse(ch, SPELL_FIREBALL);
If that's OK, then there is something wrong with how killedbytype is being calculated.

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

More
11 Dec 2017 09:48 - 11 Dec 2017 10:06 #7232 by JTP
Replied by JTP on topic Corpses
What about using 0 instead of NULL any difference, i see both things used in the code ?

Maybe i need to add: int killedbytype

Somewhere in spells.h and/Or spells.c

Iwe reached a dead end, But where ? Sense the default message works.

And what If its a skill that killed the mob hmm.
Last edit: 11 Dec 2017 10:06 by JTP.

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

More
14 Dec 2017 18:48 - 14 Dec 2017 18:48 #7245 by JTP
Replied by JTP on topic Corpses
Noone knows ?
Last edit: 14 Dec 2017 18:48 by JTP.

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

More
14 Dec 2017 19:06 #7246 by zusuk
Replied by zusuk on topic Corpses
Are you carrying the spellnum from damage() to death functions?

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

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

More
14 Dec 2017 19:29 #7247 by JTP
Replied by JTP on topic Corpses
Al code is posted here. How would i do that ?


What about difference between using 0 or NULL ?

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

Time to create page: 0.636 seconds