Can someone pint me in the right direction to give players a set of
leathers and some gold upon startup? Im sure someone has done this, how
did you go about it?
I noticed that you got a reply that used an array of object vnums and a
for loop. The following code will procude larger executable, but it should
run faster. (I usually choose to sacrifice memory for speed.) Just another
option...
/* call do_newbie right after do_start() in interpreter.c */
void do_newbie(struct char_data *ch) {
struct obj_data *obj;
switch (GET_CLASS(ch)) {
case CLASS_WARRIOR :
obj = read_object(3021, VIRTUAL);
obj_to_char(obj, ch);
obj = read_object(3043, VIRTUAL);
obj_to_char(obj, ch);
break;
case CLASS_MAGIC_USER :
obj = read_object(3020, VIRTUAL);
obj_to_char(obj, ch);
obj = read_object(3043, VIRTUAL);
obj_to_char(obj, ch);
break;
case CLASS_THIEF:
obj = read_object(3021, VIRTUAL);
obj_to_char(obj, ch);
obj = read_object(3043, VIRTUAL);
obj_to_char(obj, ch);
break;
case CLASS_CLERIC:
obj = read_object(7202, VIRTUAL);
obj_to_char(obj, ch);
obj = read_object(3043, VIRTUAL);
obj_to_char(obj, ch);
break;
}
}
This archive was generated by hypermail 2b30 : 12/07/00 PST