Advertisement
AbAeterno

V2 - Quest structure

Mar 5th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. /**********/
  2. /* Quests */
  3. /**********/
  4.  
  5. #define QUESTSIZE (sizeof(struct quest)*100)
  6.  
  7. struct quest
  8. {
  9.     char name[40];
  10.     char description[200];
  11.  
  12.     // objectives ID examples: 1 - deliver item, 2 - slay X monsters from class Y, 3 - slay 1 monster from # template, etc.
  13.  
  14.     unsigned char obj_x; // amount of objectives
  15.  
  16.     unsigned char objective[10]; // objective ID for quests
  17.     unsigned int objective_data[10][2] // extra data for each objective (# monsters to slay, # items in delivery stack, etc.)
  18.  
  19.     // requirements
  20.     unsigned char req_rank; // rank requirement
  21.     unsigned char req_EL; // effective level requirement
  22.     unsigned char req_quest; // requires completion of quest #
  23.  
  24.     // rewards
  25.     unsigned int rwd_xp;
  26.     unsigned int rwd_gp;
  27.     unsigned int rwd_skill;
  28.     unsigned int rwd_item;
  29.     unsigned int rwd_itemx; // for stackable items, i.e. amount in stack
  30.     unsigned char rwd_special; // special rewards - defined through code
  31.  
  32.     unsigned char chain; // # of quest unlocked once completing this one
  33.  
  34.     unsigned int compl[10]; // sets up to other 10 quests as completed once this one is completed
  35.  
  36.     // 0-> greet / 1-> in progress / 2-> finish
  37.     char msg_greet[160];
  38.     char msg_progress[160];
  39.     char msg_finish[160];
  40.  
  41. } __attribute__ ((packed));
  42.  
  43. /**********/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement