Guest User

Untitled

a guest
Dec 6th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1.  
  2. /* Save Skills */
  3. for (i = 1; i <= SK_ARRAY_MAX; i++) {
  4. if (GET_SKILL(ch, i))
  5. fprintf(fl, "Skil: %d %d %d %d\n", i, GET_SKILL(ch, i), GET_SKILL_RANK(ch, i), GET_SKILL_XP(ch, i));
  6. }
  7.  
  8.  
  9. /**************************************/
  10.  
  11.  
  12. static void load_skills(FILE *fl, struct char_data *ch) {
  13. int num = 0, num2 = 0;
  14. char line[MAX_INPUT_LENGTH + 1];
  15.  
  16. do {
  17. get_line(fl, line);
  18. sscanf(line, "%d %d %d %d", &num, &num2, &num3, &num4);
  19. if (num != 0) {
  20. GET_SKILL(ch, num) = num2;
  21. GET_SKILL_RANK(ch, num) = num3;
  22. GET_SKILL_XP(ch, num) = num4;
  23. }
  24. } while (num != 0);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment