New Spell & Skill system

From: David Cole (tiznor@hotmail.com)
Date: 02/27/02


Hell again,

I've rewritten the entire spell and skill system on my MUD and I have
changed the practice guild lines for skills and spells. When you practice
all spells are set to one hundred or top learning level, basically how I did
this was just move all the skill defines to skills.h and renumbered them to
1 to whatever then copied all find_spell_num to find_skill num etc etc.. I
did this cause I found it easier then messing with the two combined. Well
now that my little story is completed I was wondering if anyone has redone
practice to be based around level(s), say you can only practice something
twice per level and each time you prac it applies one point towards that
skill? I searched the archive and really didn't find anything useful. If
anyone has done this would you mind sharing how you did it? Or maybe just
give me some ideas or something? I've tried using prac_params and just
making it level based instead of class but that didn't work out cause of the
practice point system (Which I'm wanting to ditch entirely.) below is my
spec_guild and what I have changed, anyone care to point me in a proper
direction?

SPECIAL(guild)
{
  int skill_num, percent, spell_num;

  if (IS_NPC(ch) || !CMD_IS("practice"))
    return (0);

  skip_spaces(&argument);

  if (!*argument) {
    list_skills(ch);
    return (1);
  }
  skill_num = FindSkillNum(argument);
  spell_num = find_spell_num(argument);

  if (IS_SPELL(spell_num)) {
  if (spell_num < 1 || GET_LEVEL(ch) < spell_info[spell_num].min_level[(int)
GET_CLASS(ch)]) {
    send_to_char("You do not know of that spell.\r\n", ch);
    return (1);
  }
  if (GET_SPELL(ch, spell_num) >= 100) {
    send_to_char("You already know that spell.\r\n", ch);
    return (1);
  }
  send_to_char("You practice for a while...\r\n", ch);

  SET_SPELL(ch, spell_num, MIN(LEARNED(ch), 100));

  if (GET_SPELL(ch, spell_num) >= 100)
    send_to_char("You are now learned in that area.\r\n", ch);
  } else

  if (skill_num < 1 || GET_LEVEL(ch) < skill_info[skill_num].min_level[(int)
GET_CLASS(ch)]) {
    send_to_char("You do not know of that skill.\r\n", ch);
    return (1);
  }
  if (GET_SKILL(ch, skill_num) >= LEARNED(ch)) {
    send_to_char("You are already learned in that area.\r\n", ch);
    return (1);
  }
  send_to_char("You practice for a while...\r\n", ch);

  percent = GET_SKILL(ch, skill_num);
  percent += MIN(MAXGAIN(ch), MAX(MINGAIN(ch), int_app[GET_INT(ch)].learn));

  SET_SKILL(ch, skill_num, MIN(LEARNED(ch), percent));

  if (GET_SKILL(ch, skill_num) >= LEARNED(ch))
    send_to_char("You are now learned in that area.\r\n", ch);
  return (1);
}

I don't know if I'm being cryptic or very self explanatory, if more info is
needed by all means ask :)

Thanks,
Dave

--
   +---------------------------------------------------------------+
   | 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/25/03 PDT