I saw a message from someone wondering about monster multi-attacks. It is easy to code it: it is almost the same as the player multi-attacks. Here is what I did to make the monsters able to attack more than once per round. One thing about my code is the fact that all monsters attack the same number of times. Since monsters don't have classes, how would I make a general code that would give different types of mobs different numbers of attacks? I'm sure a 20th level janitor wouldn't have the same number of attacks as a 20th level death knight :) [my code begins here] /* NPC 2nd attack at level 15 */ if((IS_NPC(ch) && (GET_POS(ch)) == POS_FIGHTING)) if((GET_LEVEL(ch) > 14) && FIGHTING(ch)) hit(ch, FIGHTING(ch), TYPE_UNDEFINED); /* NPC 3rd attack at level 20 */ if((IS_NPC(ch) && (GET_POS(ch)) == POS_FIGHTING)) if((GET_LEVEL(ch) > 19) && FIGHTING(ch)) hit(ch, FIGHTING(ch), TYPE_UNDEFINED); /* NPC 4th attack at level 25 */ if((IS_NPC(ch) && (GET_POS(ch)) == POS_FIGHTING)) if((GET_LEVEL(ch) > 24) && FIGHTING(ch)) hit(ch, FIGHTING(ch), TYPE_UNDEFINED); /* NPC 5th attack at level 30 */ if((IS_NPC(ch) && (GET_POS(ch)) == POS_FIGHTING)) if((GET_LEVEL(ch) > 29) && FIGHTING(ch)) hit(ch, FIGHTING(ch), TYPE_UNDEFINED); [my code ends here] Just insert this into fight.c at the very end under your player multi attacks and bingo monsters hit twice at 15, three times at 20, four times at 25, and five times at 30.
This archive was generated by hypermail 2b30 : 12/07/00 PST