Forwarded message: > > G'day all, I'm trying to write a Disarm skill for fighters which should > *all fingers crossed* disarm the mobile for between 1-3 rounds of a fight. > I have all the checks in place but I have no idea where remove the the > weapon and then make the mobile wield it again after the disarmed rounds are > over with. > > Thanks in advance > > Wid > > Well removing the weapon is simple: unequip_char(<mob>, WEAR_WIELD); Re-equipping is a bit harder. You are going to have to set a mob timer or some such other counter to track how long he'd been disarmed. id GET_MOB_WAIT(ch) a circle function or is it something the other imp I work with coded? You can make code in mobact.c to make mobs auto-wield any weapons in their inventory (my mobs do this, it makes them a bit more intelligent, they also wear any armor they pick up). Just set a timer that when it's diarmed the timer is set to say 3, then every mob pulse in mobact.c decrease the timer by 1, if the timer >= 1 then have it skip over the auto-wield code, or if you don't want auto-wield, when the timer hits 0, make the mob wield the first weapon in his inventory (as that is what will have been disarmed. This make any sense? :)
This archive was generated by hypermail 2b30 : 12/07/00 PST