Welcome to the Builder Academy

Question suffering from poison

More
24 Apr 2017 06:05 - 24 Apr 2017 06:06 #6651 by JTP
Replied by JTP on topic suffering from poison
Hi

I still have people freeze the mud so i need to kill the process and restart, anyone who can see whats wrong below ?
Code:
if (GET_POS(i) >= POS_STUNNED) { GET_HIT(i) = MIN(GET_HIT(i) + hit_gain(i), GET_MAX_HIT(i)); GET_MANA(i) = MIN(GET_MANA(i) + mana_gain(i), GET_MAX_MANA(i)); GET_MOVE(i) = MIN(GET_MOVE(i) + move_gain(i), GET_MAX_MOVE(i)); if (AFF_FLAGGED(i, AFF_POISON)) if (damage(i, i, 2, SPELL_POISON) == -1) continue; /* Oops, they died. -gg 6/24/98 */ if ((!ROOM_FLAGGED(IN_ROOM(i), ROOM_DARK) && (!ROOM_FLAGGED(IN_ROOM(i), ROOM_INDOORS)) && (!ROOM_FLAGGED(IN_ROOM(i), ROOM_TUNNEL))) && (GET_RACE(i) == RACE_DROW) && (!AFF_FLAGGED($ if (damage(i, i, GET_LEVEL(i), SPELL_SUN_LIGHT) == -1) continue; } if (GET_POS(i) <= POS_STUNNED) update_pos(i); } else if (GET_POS(i) == POS_INCAP) { if (damage(i, i, 1, TYPE_SUFFERING) == -1) continue; } else if (GET_POS(i) == POS_MORTALLYW) { if (damage(i, i, 2, TYPE_SUFFERING) == -1) continue; } if (!IS_NPC(i)) { update_char_objects(i); (i->char_specials.timer)++; if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL) check_idling(i); } }
Last edit: 24 Apr 2017 06:06 by JTP.

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

More
25 Apr 2017 01:43 #6658 by krell
Replied by krell on topic suffering from poison
This only happens when the player is incapacitated or dying from poison?

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

More
25 Apr 2017 16:45 #6659 by JTP
Replied by JTP on topic suffering from poison
Aparently when mob reaches incapacitated

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

More
26 Apr 2017 00:11 #6661 by WhiskyTest
Replied by WhiskyTest on topic suffering from poison
Couple of brackets were wrong. This works, but I took out your RACE_DROW and SPELL_SUN_LIGHT so I could test it on vanilla. Pop those back in and you should be good to go
Code:
if (GET_POS(i) >= POS_STUNNED) { GET_HIT(i) = MIN(GET_HIT(i) + hit_gain(i), GET_MAX_HIT(i)); GET_MANA(i) = MIN(GET_MANA(i) + mana_gain(i), GET_MAX_MANA(i)); GET_MOVE(i) = MIN(GET_MOVE(i) + move_gain(i), GET_MAX_MOVE(i)); if (AFF_FLAGGED(i, AFF_POISON)) if (damage(i, i, 2, SPELL_POISON) == -1) continue; if (!ROOM_FLAGGED(IN_ROOM(i), ROOM_DARK) && (!ROOM_FLAGGED(IN_ROOM(i), ROOM_INDOORS)) && (!ROOM_FLAGGED(IN_ROOM(i), ROOM_TUNNEL))) if (damage(i, i, GET_LEVEL(i), SPELL_MAGIC_MISSILE) == -1) continue; if (GET_POS(i) <= POS_STUNNED) update_pos(i); } else if (GET_POS(i) == POS_INCAP) { if (damage(i, i, 1, TYPE_SUFFERING) == -1) continue; } else if (GET_POS(i) == POS_MORTALLYW) { if (damage(i, i, 2, TYPE_SUFFERING) == -1) continue; } if (!IS_NPC(i)) { update_char_objects(i); (i->char_specials.timer)++; if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL) check_idling(i); } }

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

More
03 May 2017 16:06 - 03 May 2017 16:07 #6682 by JTP
Replied by JTP on topic suffering from poison/Sun light
Hmm, hoped it was fixed. But again today a drow without Globe of darkness, Frooze the mud.

As soon as he studied Globe of darkness and used that spell, Then all is fine.

Hope there is a clever person here who Can tell me what is wrong.
Last edit: 03 May 2017 16:07 by JTP.

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

More
03 May 2017 18:46 #6683 by krell
What kind of editor are you using to write your code? Is it something that tracks your syntax and makes appropriate suggestions or are you just coding with a simple text editor? The reason I ask is that there might be a syntax error, or possibly a logic error, in your conditional statements for drows and globe of darkness that's causing the mud to hang.

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

Time to create page: 0.200 seconds