Joe Frohne wrote: > > > the mud crashes and dumps core after seemingly random amount > > > + if (!IS_NPC(ch) && GET_POS(FIGHTING(ch)) >= POS_FIGHTING) { > > + if (GET_SKILL(ch,SKILL_SEC_ATTACK) > 0) { > > + if (number(1,101) < GET_SKILL(ch,SKILL_SEC_ATTACK)) { > > + hit(ch,FIGHTING(ch),TYPE_UNDEFINED); > > + } > > + } > > + } > > > > > > hit(ch,FIGHTING(ch),TYPE_UNDEFINED) > What i did is take the snippet and use it, but the snippet had a flaw that it would try to attack the mob after it was already dead. My final one looks like this: (make sure to have the inital non-skill attack come first, unless you want an if check for that one too) hit(ch, FIGHTING(ch), TYPE_UNDEFINED); if(GET_SKILL(ch, SKILL_SECOND) && (FIGHTING(ch) != NULL)) { if(GET_SKILL(ch, SKILL_SECOND) > (number(1,325)-5*GET_LEVEL(ch))) { hit(ch, FIGHTING(ch), TYPE_UNDEFINED); } } You get the idea. If you use this, change the number(1, x) to something lower, because i have 50 levels, and you probably use only 30. (if you used those numbers, you'd never hit a second time) You also wanted a !IS_NPC(ch) or whatever, just throw it in the if check. If someone thinks this is bad code to work off of, let me know...but i haven't had a problem with it. The numbers are a little screwed too, i am fiddling with them to get the desired effect. Jory +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST