[Circle] [newbie] auto newbie equip based on class.

From: Cyber Reaper (Reaper@cyber.reno.nv.us)
Date: 08/08/96


*sigh* ok, I alterd the newbie command attached it to INIT_CHAR in DB.C, I
get no errors and the code looks ok to me, but when I run it does not
autoequip the newbies, it just acts like the code is not even there, I will
post the init_char and perhaps someone could tell me why it is not working.
thank you.



----snip----
/* initialize a new character only if class is set */
void init_char(struct char_data * ch)
----snip----
...

----snip----

  ch->real_abils.intel = 25;
  ch->real_abils.wis = 25;
  ch->real_abils.dex = 25;
  ch->real_abils.str = 25;
  ch->real_abils.str_add = 100;
  ch->real_abils.con = 25;
  ch->real_abils.cha = 25;

  for (i = 0; i < 3; i++)
    GET_COND(ch, i) = (GET_LEVEL(ch) == LVL_IMPL ? -1 : 24);

  GET_LOADROOM(ch) = NOWHERE;

/* I added here */
 if (GET_CLASS(ch) == CLASS_MAGIC_USER)
{
int give_obj[] = {18614, 18602, 18612, 18613, 4, -1};

  struct obj_data *obj;
  int i;

  for (i = 1; give_obj[i] != -1; i++) {
    obj = read_object(give_obj[i], VIRTUAL);
    obj_to_char(obj, ch);
  }
}
 if (GET_CLASS(ch) == CLASS_CLERIC)
{
int give_obj[] = {18614, 18602, 18612, 18613, 4, -1};

  struct obj_data *obj;
  int i;

  for (i = 1; give_obj[i] != -1; i++) {
    obj = read_object(give_obj[i], VIRTUAL);
    obj_to_char(obj, ch);
  }
}
if (GET_CLASS(ch) == CLASS_WARRIOR)
{
int give_obj[] = {18601, 18602, 18612, 18613, 4, -1};

  struct obj_data *obj;
  int i;

  for (i = 1; give_obj[i] != -1; i++) {
    obj = read_object(give_obj[i], VIRTUAL);
    obj_to_char(obj, ch);
  }
}
if (GET_CLASS(ch) == CLASS_THIEF)
{
int give_obj[] = {18606, 18602, 18612, 18613, 4, -1};

  struct obj_data *obj;
  int i;

  for (i = 1; give_obj[i] != -1; i++) {
    obj = read_object(give_obj[i], VIRTUAL);
    obj_to_char(obj, ch);
  }
}

}
----snip----

ok, now I think this should work, but it is not. I put it here because it is
only called on a new char, after class has been selected. can someone help me.

also I tried obj_to_char(obj, vict); but it said it was uninitulized and I
dont know how to go about initulazing vict. I dont see it done any where else,


thank you.

Realms Of Reality!
****OPEN FOR BETA TESTERS****
****NEED MORE CODERS!!!!****
http://greatbasin.net/~cyber/index.html
telnet://login.greatbasin.net 4000

Cyber Reaper: "The information super highway road hog!"
Reaper@cyber.reno.nv.us

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/07/00 PST