1
0
mirror of https://github.com/TeTpaAka/quests.git synced 2024-12-23 01:00:40 +01:00

updated README

This commit is contained in:
TeTpaAka 2015-02-21 14:57:09 +01:00
parent c3a7d986ae
commit 403eb1aad8

16
README
View File

@ -3,18 +3,20 @@ quests is a simple quest framework for minetest that lets you define your own qu
You can see a full list of your active quests with the chatcommand /quests You can see a full list of your active quests with the chatcommand /quests
API: API:
quests.register_quest(playername, questname, description, max, autoaccept, callback) quests.register_quest(playername,questname,quest)
-- registers a quest for the specified player -- registers a quest for the specified player
-- --
-- playername is the name of the player, who gets the quest -- playername is the name of the player, who gets the quest
-- questname is the name of the quest to identify it later -- questname is the name of the quest to identify it later
-- it should follow the naming conventions: "modname:questname" -- it should follow the naming conventions: "modname:questname"
-- description is shown to the player and should contain usefull information about the quest. -- quest is a table in the following format
-- max is the desired maximum -- {
-- autoaccept is true or false, wether the result of the quest should be dealt -- title, -- is shown to the player and should contain usefull information about the quest.
-- by this mode or the registering mod -- description, -- a small description of the mod.
-- when autoaccept is true, at the end of the quest, it gets removed and -- max, -- is the desired maximum. If max is 1, no maximum is displayed. defaults to 1
-- callback is called -- autoaccept, -- is true or false, wether the result of the quest should be dealt by this mode or the registering mod.
-- callback -- when autoaccept is true, at the end of the quest, it gets removed and callback is called.
-- }
-- --
-- returns true, when the quest was successfully registered -- returns true, when the quest was successfully registered
-- returns falls, when there was already such a quest -- returns falls, when there was already such a quest