mystickdreamer

Untitled

Nov 28th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. At top of players.c
  2. static void load_skills(struct char_data *ch, const char *line, int mode);
  3.  
  4.  
  5. under Case S: in load_char
  6. else if (!strcmp(tag, "Skil"))load_skills(ch, line, LOAD_SKILL);
  7.  
  8.  
  9. the function of load_skill (based off of load_mana
  10. static void load_skills (struct char_data *ch, const char *line, int mode) {//(FILE *fl, struct char_data *ch) {
  11.     int num = 0, num2 = 0, i;
  12.  
  13.     sscanf(line, "%d/%d", &num, &num2);
  14.    
  15.     switch (mode) {
  16.         case LOAD_SKILL:
  17.         GET_SKILL_RANK(ch, i) = num;
  18.         GET_SKILL_XP(ch, i) = num2;
  19.         break;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment