Ok, I am ready to pull out my hair. What I am trying to do is this, make a mob use a skill without having to create a special procedure for it. I have already done this: Assigned classes to mobs. Assigned skills to mobs. So a mob classed as a warrior is the same as a pc classed as a warrior (same skills each level etc). For the sake of simplicity I have assisgned skill values based on a level formual at boot time in db.c The problem comes in when I get into fight.c, specifically perform_violence. I don't think I understand what this function is supposed to be doing. It looks like it loops through the combat_list and checks some things for sanity (no longer fighting for example) also, if the GET_MOB_WAIT > 0 it drops out of the loop and misses the hit at the bottom. So what is happening is when I try to call a small function check mob_warrior(ch) the mob ONLY kicks every 3 rounds but never gets to the hit() below. This really isn't right, because PCs can perform a kick every 3 rounds AND keep hitting all the while. What further confuses me is right below the check: if (IS_NPC(ch)) { if (GET_WAIT_STATE(ch) > 0) { GET_WAIT_STATE(ch) -= PULSE_VIOLENCE; continue; } GET_WAIT_STATE(ch) = 0; ^^^^^^^^^^^^^^^^^^^^^^^ The wait state is reset to 0 each time?!? I would like some help understand what is happening here and what the logic behind it is. Also, I have changed GET_MOB_WAIT references to GET_WAIT_STATE since they appear to be the same thing? utils.h: #define GET_MOB_WAIT(ch) GET_WAIT_STATE(ch) /* New, preferred macro. */ #define GET_WAIT_STATE(ch) ((ch)->wait) Help? --Ziz _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/24/03 PDT