>ACMD(do_forage) [--snip--] ACMD(do_forage) { struct obj_data *ofound; int percent, prob, obj = 10; /* if (!IS_RANGER(ch) || (GET_LEVEL(ch) < LVL_IMMORT)) { */ if (GET_LEVEL(ch) < LVL_IMMORT) { send_to_char(ch, "Your wilderness survival skills really aren't that good.\r\n"); return; } switch (SECT(ch->in_room)) { case SECT_FIELD: case SECT_FOREST: case SECT_HILLS: case SECT_MOUNTAIN: break; default: send_to_char(ch, "Don't execpt to find much here!\r\n"); return; } if (IS_NPC(ch)) prob = GET_MSKILL(ch, SKILL_FORAGE); else prob = GET_SKILL(ch, SKILL_FORAGE); percent = rand_number(1, 100); if (percent < 2) skill_gain(ch, SKILL_FORAGE); if (percent > prob) { send_to_char(ch, "You find nothing interesting.\r\n"); GET_MOVE(ch) = (GET_MOVE(ch) - (percent / 2)); WAIT_STATE(ch, PULSE_VIOLENCE * 4); return; } send_to_char(ch, "You found a little something.\r\n"); ofound = read_object(obj, VIRTUAL); obj_to_char(ofound, ch); GET_MOVE(ch) = (GET_MOVE(ch) - (percent / 2)); WAIT_STATE(ch, PULSE_VIOLENCE * 4); } This is my test version of the forage skill, which is currently only for test by IMPs. It was based off the forage skill code you posted.If successful, it allows you to find object #10, which should be a waybread in most stock games. --Ziz _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- +---------------------------------------------------------------+ | 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/26/03 PDT