/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
/************************************************************************
	Realms of Aurealis 		James Rhone aka Vall of RoA

quest.h					OLQC - OnLine Quest Creation using
					the RoAOLCv2.1 interface standard.
					Header file for quest.c.


		******** 100% Completely Original Code ********
		*** BE AWARE OF ALL RIGHTS AND RESERVATIONS ***
		******** 100% Completely Original Code ********
		        All rights reserved henceforth. 

    Please note that no guarantees are associated with any code from
Realms of Aurealis.  All code which has been released to the general
public has been done so with an 'as is' pretense.  RoA is based on both
Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well
as the RoA license.   *** Read, Learn, Understand, Improve ***
*************************************************************************/
#ifndef ROA_QUEST_H
#define ROA_QUEST_H

#define QUEST_DIR		"quests"

// quest flags for qslot bitvectors
#define Q_ACTIVATED		(1 << 0)
#define Q_SOLO			(1 << 1)
#define Q_MOB_GOBYEBYE		(1 << 2)
#define Q_HAS_TIMELIMIT		(1 << 3)
#define Q_ONE_TIMEONLY		(1 << 4)
#define Q_IMMEDIATE_REWARD	(1 << 5)
#define Q_REWARD_EXP		(1 << 6)
#define Q_REWARD_GOLD		(1 << 7)
#define Q_REWARD_QPTS		(1 << 8)
#define Q_REWARD_OBJECT		(1 << 9)
#define Q_NOTIFY_CHAR		(1 << 10)
#define Q_NOTIFY_WORLD		(1 << 11)
#define Q_NOTIFY_ZONE		(1 << 12)
#define Q_MIN_LEVEL		(1 << 13)
#define Q_MAX_LEVEL		(1 << 14)
#define Q_ENEMY_DURING		(1 << 15)
#define Q_ENEMY_AFTER		(1 << 16)
#define Q_REMAINS		(1 << 17)

// quest race/class flags for race_class bitvector
#define Q_NO_HUMAN        (1 << 0)
#define Q_NO_ELF          (1 << 1)
#define Q_NO_HALF_ELF     (1 << 2)
#define Q_NO_ORC          (1 << 3)
#define Q_NO_OGRE         (1 << 4)
#define Q_NO_DROW         (1 << 5)
#define Q_NO_DWARF        (1 << 6)
#define Q_NO_PIXIE        (1 << 7)
#define Q_NO_NIXIE        (1 << 8)
#define Q_NO_DRAGON       (1 << 9)
// now for classes
#define Q_NO_MAGE        (1 << 10)
#define Q_NO_BARD        (1 << 11)
#define Q_NO_RANGER      (1 << 12)
#define Q_NO_WARRIOR     (1 << 13)
#define Q_NO_CLERIC      (1 << 14)
#define Q_NO_SHAMAN      (1 << 15)
#define Q_NO_THIEF       (1 << 16)
#define Q_NO_WARLOCK     (1 << 17)
#define Q_NO_MONK        (1 << 18)
#define Q_NO_MADEPT      (1 << 19)
#define Q_NO_DRUID       (1 << 20)

// quest types
#define QTYPE_OBJ_RETURN	0
#define QTYPE_SLAYMOB		1

struct quest_slot {
  char *qname;
  char *qdesc;
  char *char_notification;
  char *zone_notification;
  char *world_notification;

  int qtype;
  int bitvector;
  int race_class_bitv;
  
  int days_to_complete;
  int exp_reward;
  int gold_reward;
  int qpts_reward;
  int obj_reward;
 
  int minlevel;
  int maxlevel;

  int qobj_vnum;
  int num_qobjs;

  int qslaymob_vnum;
  int num_qmobs;

  int enemy_vnum;
};
typedef struct quest_slot qslot;

#define QFLAGS(i)		((i)->bitvector)
#define QRCFLAGS(i)		((i)->race_class_bitv)

#define QFLAGGED(i, f)		(IS_SET(QFLAGS((i)), (f)))
#define QRCFLAGGED(i, f)	(IS_SET(QRCFLAGS((i)), (f)))
#define QFLAG(i, f)		(SET_BIT(QFLAGS((i)), (f)))
#define QRCFLAG(i, f)		(SET_BIT(QRCFLAGS((i)), (f)))
#define QUNFLAG(i, f)		(REMOVE_BIT(QFLAGS((i)), (f)))
#define QRCUNFLAG(i, f)		(REMOVE_BIT(QRCFLAGS((i)), (f)))

#define QUEST_EDITTED(ch)	((ch)->pc_specials->q_editted)
#define QUEST_PTS(ch)		((ch)->pc_specials->saved.quest_pts)
#define PCQINFO(ch, i)		((ch)->pc_specials->pqinfo[(i)])
#define COMPLETED_QUEST(ch, i)	(PCQINFO((ch), (i)).num_times_completed)
#define ONQUEST(ch)		((ch)->pc_specials->on_quest)
#define QUEST_TIME(ch)		((ch)->pc_specials->days_left)
#define QVNUM(ch)		((ch)->pc_specials->vnum_to_getslay)
#define QGOTTEN(ch)		((ch)->pc_specials->num_gottenslain)

#define VALID_QUEST(i)		((i) >= 0 && (i) < NUM_QUESTS)

// prototypes
BOOL save_char_quests(chdata *ch);
int  qcheck_obj_give(chdata *ch, chdata *vict, obdata *obj);
int  qcheck_obj_get(chdata *ch, obdata *obj);
int  qcheck_slaymob(chdata *ch, int mob_vnum);

#endif /* ROA_QUEST_H */