Crossfire Server  1.75.0
dialog.h
Go to the documentation of this file.
1 #ifndef DIALOG_H
2 #define DIALOG_H
3 
7 enum reply_type {
8  rt_say = 0,
9  rt_reply = 1,
11 };
12 
17  char *reply;
18  char *message;
21 };
22 
27  char *match;
28  char *message;
31  bool identifies;
32 };
33 
40 };
41 
43 #define MAX_REPLIES 10
44 
45 #define MAX_NPC 5
46 
50 struct talk_info {
51  struct object *who;
52  const char *text;
56  sstring replies_words[MAX_REPLIES];
57  sstring replies[MAX_REPLIES];
59  sstring npc_msgs[MAX_NPC];
60 };
61 
62 extern void dialog_preparse(object *op);
63 
64 extern const char *NPC_DIALOG_ARCH;
65 
66 
67 #endif /* DIALOG_H */
int npc_msg_count
How many NPCs reacted to the text being said.
Definition: dialog.h:58
void dialog_preparse(object *op)
Definition: dialog.cpp:110
sstring message
If not NULL, what the player will be displayed as said.
Definition: dialog.h:53
char * message
What the player will actually say for this reply.
Definition: dialog.h:18
struct struct_dialog_message * next
Next message, NULL if last.
Definition: dialog.h:30
One reply a NPC can expect.
Definition: dialog.h:16
struct struct_dialog_reply * all_replies
All replies, to quickly search things.
Definition: dialog.h:38
Main Crossfire structure, one ingame object.
Definition: object.h:282
reply_type
Various kind of messages a player or NPC can say.
Definition: dialog.h:7
int replies_count
How many items in replies_words and replies.
Definition: dialog.h:55
Asking a question.
Definition: dialog.h:10
char * match
What the player should say, can be a regexp.
Definition: dialog.h:27
#define MAX_REPLIES
How many NPC replies maximum to tell the player.
Definition: dialog.h:43
Structure used to build up dialog information when a player says something.
Definition: dialog.h:50
const char * text
What the player actually said.
Definition: dialog.h:52
bool identifies
Identify the speaker when this message is matched.
Definition: dialog.h:31
const char * NPC_DIALOG_ARCH
Definition: dialog.cpp:28
Reply to something.
Definition: dialog.h:9
char * reply
Reply expected from the player.
Definition: dialog.h:17
Basic sentence.
Definition: dialog.h:8
Message information for a NPC.
Definition: dialog.h:37
#define MAX_NPC
How many NPCs maximum will reply to the player.
Definition: dialog.h:45
One message a NPC can react to.
Definition: dialog.h:26
reply_type message_type
A reply_type value for message.
Definition: dialog.h:54
struct struct_dialog_reply * replies
Replies this message has.
Definition: dialog.h:29
char * message
What the NPC will say.
Definition: dialog.h:28
struct object * who
Player saying something.
Definition: dialog.h:51
struct struct_dialog_message * all_messages
Messages the NPC can use.
Definition: dialog.h:39
struct struct_dialog_reply * next
Next reply, NULL for last.
Definition: dialog.h:20
const char * sstring
Definition: sstring.h:2
reply_type type
Type of message.
Definition: dialog.h:19