On Fri, 19 Apr 1996, corey hoitsma wrote: > > Number one: > > How would I create a beserk/hitall skill for warriors and thieves? > I thought about using the 'earthquake' spell as an example > but I'm afraid that wouldn't work to well.. last time I did that > I messed everything up:P Just loop through the people in the current room and hit them. Maybe something like: ---------------------8< SNIP >8--------------------- struct char_data *people; for (people = world[ch->in_room].people; people; people=people->next) if (!PRF_FLAGGED(people, PRF_NOHASSLE)) hit(ch, people, 0, TYPE_UNDEFINED); ---------------------8< SNIP >8--------------------- Or something like that, anyway. Maybe you need to use "damage" instead? Anyway, skills are unfortunately unlike spells and you cannot use a skill like a spell... > > Number two: > > How would I add a flag? I know how I'd get who and look to recognize > a flag.. like KILLER or THIEF.. but I can't seem to be able to make > a new flag.. like for AFK or AFW. Just add a #define to structs.h, eg., #define PRF_AFK (1 << xx) Where "xx" is the next availible number up to and including 32. Like, say you have: #define DEAF_GOSSIP (1 << 0) #define DEAF_SHOUT (1 << 1) #define DEAF_HOLLER (1 << 2) #define DEAF_GRATS (1 << 3) #define DEAF_AUCTION (1 << 4) #define DEAF_TELL (1 << 5) #define DEAF_WIZSAY (1 << 6) #define DEAF_CLANSAY (1 << 7) And you wanted to add DEAF_ANNOUNCE, you just add: #define DEAF_ANNOUNCE (1 << 8) That's all there is to it. But remember, you cannot add over 32 using the current way bitvectors are implemented in CircleMUD. > > Number three: > > I have recently added multi-hits to my mud... up to 5. > Now... what I want to do is add a bitvector to the NPC's that > tell the mud how many hits they get.. say one that's hitone > maye hittwo, etc.. any idea on how to go about this? A better way of doing this would be to add: byte apr; To mob_specials_data (or whatever that structure was called) and use an extended format to load it. This requires a very small change to the db.c code, and, if you are using any OLC system be sure to make it so mobs with their "apr" set save that out. If you can't figure it out then just ask via e-mail. > > Last but not least.. and most important: > > I've been browsing around in lots of diffrent kinds of MUDs in the > past years, and I noticed on Farside Muds(ie. Avatar) and maybe it's > Merc too, have a spell system that uses the damage messages for > offensive spells/skills.. Hm, to me that seems highly generic, but if you really want to do it that way, then it's kind of easy to do. It requires that you stop using skill_message and instead write a little function to just use the spell name and write a simple function (kind of like dam_message) to show the spell name and a damage message. If you need some help, don't hesitate to e-mail me.
This archive was generated by hypermail 2b30 : 12/18/00 PST