 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
25 #define QUESTFILE_NEXTQUEST 0
26 #define QUESTFILE_QUEST 1
27 #define QUESTFILE_QUESTDESC 2
28 #define QUESTFILE_STEP 3
29 #define QUESTFILE_STEPDESC 4
30 #define QUESTFILE_STEPCOND 5
31 #define QUESTFILE_COMMENT 6
47 if (strcmp(read,
"end_setwhen") == 0) {
63 step->conditions.push_back(cond);
64 LOG(
llevDebug,
"condition added for step %d of quest %s, looking for quest %s between steps %d and %d\n",
69 if (strcmp(read,
"end_description") == 0) {
89 if (strcmp(read,
"end_step") == 0) {
94 if (strcmp(read,
"finishes_quest") == 0) {
95 step->is_completion_step = 1;
98 if (strcmp(read,
"description") == 0) {
103 if (strcmp(read,
"setwhen") == 0) {
107 LOG(
llevError,
"quests: invalid line %s in definition of quest %s in %s:%zu!\n",
113 if (strcmp(read,
"end_description") == 0) {
131 if (strcmp(read,
"end_comment") == 0) {
145 if (strcmp(read,
"end_quest") == 0) {
155 if (strcmp(read,
"description") == 0) {
161 if (strncmp(read,
"title ", 6) == 0) {
166 if (sscanf(read,
"step %d", &i)) {
174 if (sscanf(read,
"restart %d", &i)) {
178 if (strncmp(read,
"parent ", 7) == 0) {
183 if (strncmp(read,
"face ", 5) == 0) {
188 if (strncmp(read,
"comment", 7) == 0) {
194 if (sscanf(read,
"is_system %d", &i)) {
203 if (strncmp(read,
"quest ", 6) == 0) {
214 if (strcmp(read,
"") == 0)
217 LOG(
llevError,
"quest: invalid file format for %s, I don't know what to do with the line %s\n", filename.c_str(), read);
221 LOG(
llevError,
"quest: quest definition file %s read in, ends with state %d\n", filename.c_str(),
in);
sstring quest_code
The quest that triggers the condition.
size_t bufferreader_current_line(BufferReader *br)
Return the index of the last line returned by bufferreader_next_line().
@ llevError
Error, serious thing.
quest_step_definition * quest_create_step(void)
Allocate a quest_step_definition, will call fatal() if out of memory.
int maxstep
The latest step that triggers the condition, to match, the stages must be between minstep and maxstep...
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
#define QUESTFILE_STEPDESC
In a quest step description.
#define QUESTFILE_QUESTDESC
In a quest description.
StringBuffer * stringbuffer_new(void)
Create a new string buffer.
sstring quest_description
Quest longer description.
same as sound ncom command like but with extra the client want tick commands so it knows animation timing the client wants to be informed of pickup mode changes Mode will be sent when the player successfully logs in
bool quest_is_system
If set then the quest isn't counted or listed.
sstring quest_title
Quest title for player.
sstring quest_comment
Quest comment, not visible to players.
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
QuestLoader(Quests *quests, Faces *faces, AssetsTracker *tracker)
#define QUESTFILE_STEPCOND
In a quest step conditions.
Base class to be informed of where an asset is defined.
const Face * face
Face associated with this quest.
T * define(const Key &name, T *asset)
Define an asset, erasing an existing one.
#define QUESTFILE_QUEST
In a quest definition.
sstring add_string(const char *str)
This will add 'str' to the hash table.
sstring quest_code
Quest internal code.
virtual void assetDefined(const archetype *asset, const std::string &filename)
Function called when an asset is defined in a file.
struct quest_definition * parent
Parent for this quest, NULL if it is a 'top-level' quest.
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your message
How to Install a Crossfire Server on you must install a python script engine on your computer Python is the default script engine of Crossfire You can find the python engine you have only to install them The VisualC Crossfire settings are for but you habe then to change the pathes in the VC settings Go in Settings C and Settings Link and change the optional include and libs path to the new python installation path o step
T * get(const Key &name)
Get a named asset.
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
A buffer that will be expanded as content is added to it.
int minstep
The earliest step in the quest that triggers the condition, -1 means finished, 0 means not started.
#define QUESTFILE_NEXTQUEST
Waiting for next quest definition.
One condition to automatically move to a quest step.
#define QUESTFILE_STEP
In a quest step.
Definition of an in-game quest.
virtual void load(BufferReader *reader, const std::string &filename) override
Load assets from the specified reader.
int quest_restart
If non zero, can be restarted.
#define QUESTFILE_COMMENT
In a quest comment.
static struct_quest ** quests
All quests in the game.
quest_definition * quest_create(const char *name)
int quest_condition_from_string(quest_condition *condition, const char *buffer)
Parse a single step condition.
@ llevDebug
Only for debugging purposes.
quest_condition * quest_create_condition(void)
Allocate a quest_condition, will call fatal() if out of memory.
char * bufferreader_next_line(BufferReader *br)
Return the next line in the buffer, as separated by a newline.
std::vector< quest_step_definition * > steps
Quest steps.