First, I would move the reroll command into int's own function, probably in act.other.c. Prolly like this: if (IS_NPC(ch)) return; struct obj_data *o; int has_reroll; for (o = ch->carrying; o; o = o->next_content) if (GET_OBJ_VNUM(o) == <vnum of reroll token>) has_reroll = 1; if (GET_EQ(ch, WEAR_HOLD)) if (GET_OBJ_VNUM(GET_EQ(ch, WEAR_HOLD)) == <vnum of reroll token>) has_reroll = 1; if (!GET_LEVEL(ch) < LVL_GRGOD || !has_reroll) { send_to_char("You need a token for that!\r\n", ch); return 0; } if (GET_LEVEL(ch) < LVL_GRGOD && vict != ch) { send_to_char("You can only reroll yourself!!!\r\n", ch); return 0; } send_to_char("Rerolled...\r\n", ch); roll_real_abils(vict); logf("%s has rerolled %s.", GET_NAME(ch), GET_NAME(vict)); sprintf(buf, "New stats: Str %d/%d, Int %d, Wis %d, Dex %d, Con %d, Cha %d\r\n", GET_STR(vict), GET_ADD(vict), GET_INT(vict), GET_WIS(vict), GET_DEX(vict), GET_CON(vict), GET_CHA(vict)); send_to_char(buf, ch); Then change the line in interpreter.c from: { "reroll" , "rer" , POS_DEAD , do_reroll , LVL_GRGOD, SCMD_REROLL }, to { "reroll" , "rer" , POS_DEAD , do_wizutil , 0, 0 }, This should let any player reroll himself only if he has a reroll token, and anyone GRGOD or higher can reroll anyone still. This was just off the top of my head, so it will prolly need some work. throck Circadia Adminstrator wrote: > > Greetings, > > I am really interested in making a 'reroll scroll/token' or something like > that for my mud. > Problem is, I'm not sure exactly how I can do that. Would someone be really > kind to > write a snippet or to give me guidance please? Help is very much > appreciated. :) +------------------------------------------------------------+ | 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