: Updated Bandage Skill Boxboy (baez@as-if.com) modified my old version of bandage, i liked the modifications he made, but it needed some changes. so i decided to rewrite my old bandage skill. Players who aren't trained in the skill of bandage will be able to bandage with the help of items. When using items, no movement points will be removed, but lesser hit points will be added. If a player has trained bandage but is carrying bandage items, the items will automaticly be used. This code, much like boxboys doesn't use item_bandage, so the word bandage must be in the namelist I use ITEM_BANDAGE to set how many hitpoints to give. Feel free to add it because i didn't include it in this file... Some picky smurf would probably say that you can use blabla instead of hmhm.. But thats your way, not mine ;) If you use this, be sure to credit boxboy aswell as me. Sometimes when adding new classes, you forget about the default ones, making them slightly unbalanced. This command will let your warrior, thief or whatever exchange movementpoints for hitpoints. -----------------------------[ Step One ]----------------------------- > in act.informative.c > paste this somewhere ACMD(do_bandage) { int percent, prob; struct obj_data *obj; obj = get_obj_in_list_vis(ch, "bandage", ch->carrying); if (IS_NPC(ch)) return; if (!GET_SKILL(ch, SKILL_BANDAGE)) { if (!obj) { send_to_char("You can't bandage without bandages.\r\n", ch); return; }} if (GET_SKILL(ch, SKILL_BANDAGE)) if (!obj) { if (GET_MOVE(ch) < 20) { send_to_char("You don't have enough movement points to bandage.\r\n", ch); return; }} if (GET_HIT(ch) >= GET_MAX_HIT(ch)) { send_to_char("You are already healthy!\r\n", ch); return; } percent = number(1, 101); if (GET_SKILL(ch, SKILL_BANDAGE)) prob = GET_SKILL(ch, SKILL_BANDAGE); else prob = GET_DEX(ch) * 4; if (percent > prob) { send_to_char("You fail to bandage.\r\n", ch); if (obj) extract_obj(obj); } else { if (!obj) GET_MOVE(ch) -= (GET_LEVEL(ch) / 2) + (GET_DEX(ch) * 2); if (!obj) GET_HIT(ch) += (GET_LEVEL(ch) / 2) + (GET_DEX(ch) * 2); else GET_HIT(ch) += (GET_LEVEL(ch) / 2); if (!obj) { send_to_char("You bandage yourself.\r\n", ch); act("$n bandages $mself.", FALSE, ch, 0, 0, TO_ROOM); } else { act("You bandage yorself with $p.", FALSE, ch, obj, 0, TO_CHAR); act("$n bandages $mself with $p.", FALSE, ch, obj, 0, TO_ROOM); extract_obj(obj); } if (GET_HIT(ch) >= GET_MAX_HIT(ch)) { send_to_char("You are now at full health.\r\n", ch); GET_HIT(ch) = GET_MAX_HIT(ch); } WAIT_STATE(ch, PULSE_VIOLENCE * 1); return; }} -----------------------------[ Step Two ]----------------------------- > in file class.c > search for spell_level(SKILL_TRACK, CLASS_WARRIOR > add this spell_level(SKILL_BANDAGE, CLASS_WARRIOR, 10); ----------------------------[ Step Three ]---------------------------- > in file interpreter.c > add to do_X prototypes ACMD(do_bandage); > search for "POS_DEAD , do_ban" > add this { "bandage" , POS_STANDING, do_bandage , 1, 0 }, -----------------------------[ Step Four ]---------------------------- > this is totally optional > in file spell_parser.c > search for skillo(SKILL_TRACK > add this skillo(SKILL_BANDAGE, "bandage"); -----------------------------[ Step Five ]---------------------------- > in file spells.h > search for #define SKILL_TRACK > add this #define SKILL_BANDAGE 141 ---------------------------------------------------------------------- Do whatever you want with this piece of code. Enjoy it, hate it, smash it, remake it...... If you decide to use it, please send me a mail, including the address to your mud. A line in your credit file is of course also appreciated / Hugor (hugor@freebox.com)